fix: 统计页面新功能增加,原有功能优化。
This commit is contained in:
650
src/pages/statistic/accounts/accountAnalysis/index.vue
Normal file
650
src/pages/statistic/accounts/accountAnalysis/index.vue
Normal file
@@ -0,0 +1,650 @@
|
||||
<template>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-title" ref="searchHeightRef"> 负债信息</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">净资产</div>
|
||||
<div class="num">{{ netAsset }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">总负债</div>
|
||||
<div class="num">{{ totalDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">储蓄卡余额</div>
|
||||
<div class="num">{{ debetBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">投资账户余额</div>
|
||||
<div class="num">{{ investBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">网贷欠款</div>
|
||||
<div class="num">{{ unClearedOnlineDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡已使用额度</div>
|
||||
<div class="num">{{ creditBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">人情欠款</div>
|
||||
<div class="num">{{ peopleLendHistory }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-title" ref="searchHeightRef"> 投资收益</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">投资账户余额</div>
|
||||
<div class="num">{{ investBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">总收益</div>
|
||||
<div class="num">{{ totalIncome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">期货收益</div>
|
||||
<div class="num">{{ futuresIncome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">股票收益</div>
|
||||
<div class="num">{{ stocksIncome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-title" ref="searchHeightRef"> 网贷信息</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">当月应还款</div>
|
||||
<div class="num">{{ dueOnlineDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">当月已还款</div>
|
||||
<div class="num">{{ repaidOnlineDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">当月待还款</div>
|
||||
<div class="num">{{ leftOnlineDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清网贷笔数</div>
|
||||
<div class="num">{{ unclearedOnlineDebtCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清网贷本金</div>
|
||||
<div class="num">{{ unClearedOnlineDebtPrinciple }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清网贷利息</div>
|
||||
<div class="num">{{ unClearedOnlineDebtInterest }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清网贷笔数</div>
|
||||
<div class="num">{{ clearedOnlineDebtCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清网贷本金</div>
|
||||
<div class="num">{{ clearedOnlineDebtPrinciple }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清网贷利息</div>
|
||||
<div class="num">{{ clearedOnlineDebtInterest }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-title" ref="searchHeightRef"> 信用卡信息</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡总数</div>
|
||||
<div class="num">{{ creditCount }}<span>张</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">总额度</div>
|
||||
<div class="num">{{ creditLimit }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已使用额度</div>
|
||||
<div class="num">{{ creditBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">可用额度</div>
|
||||
<div class="num">{{ creditAvailableLimit }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡使用率</div>
|
||||
<div class="num">{{ creditBillRate }}<span>%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">当月账单</div>
|
||||
<div class="num">{{ currentCreditBill }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">当月分期本息</div>
|
||||
<div class="num">{{ creditInstallment }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清分期笔数</div>
|
||||
<div class="num">{{ unclearedCreditInstallmentCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清分期本息</div>
|
||||
<div class="num">{{ unclearedCreditInstallment }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清分期本金</div>
|
||||
<div class="num">{{ unclearedCreditInstallmentPrinciple }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">未结清分期利息</div>
|
||||
<div class="num">{{ unclearedCreditInstallmentInterest }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清分期笔数</div>
|
||||
<div class="num">{{ clearedCreditInstallmentCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清分期本息</div>
|
||||
<div class="num">{{ clearedCreditInstallmentDebt }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清分期本金</div>
|
||||
<div class="num">{{ clearedCreditInstallmentPrinciple }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">已结清分期利息</div>
|
||||
<div class="num">{{ clearedCreditInstallmentInterest }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">上月账单使用率</div>
|
||||
<div class="num">{{ lastMonthUsedRate }}<span>%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">上月账单</div>
|
||||
<div class="num">{{ lastMonthUsedLimit }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近6个月账单使用率</div>
|
||||
<div class="num">{{ lastSixMonthUsedRate }}<span>%</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近6个月账单平均使用额度</div>
|
||||
<div class="num">{{ lastSixMonthUsedLimit }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-title" ref="searchHeightRef"> 征信信息</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近1月硬查询次数</div>
|
||||
<div class="num">{{ lastOneMonths }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近2月硬查询次数</div>
|
||||
<div class="num">{{ lastTwoMonths }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近3月硬查询次数</div>
|
||||
<div class="num">{{ lastThreeMonths }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近6月硬查询次数</div>
|
||||
<div class="num">{{ lastSixMonths }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近1年硬查询次数</div>
|
||||
<div class="num">{{ lastOneYears }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近2年硬查询次数</div>
|
||||
<div class="num">{{ lastTwoYears }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">总硬查询次数</div>
|
||||
<div class="num">{{ lastAllYears }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近6月个人查询次数</div>
|
||||
<div class="num">{{ lastSixMonthQueryCount }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近6月贷后管理次数</div>
|
||||
<div class="num">{{ lastSixMonthsAfterLoan }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">近2年贷后管理次数</div>
|
||||
<div class="num">{{ lastTwoYearsAfterLoan }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">贷后管理总次数</div>
|
||||
<div class="num">{{ totalAfterLoan }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-title" ref="searchHeightRef"> 基础信息</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS机总数</div>
|
||||
<div class="num">{{ posCount }}<span>台</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡总数</div>
|
||||
<div class="num">{{ creditCount }}<span>张</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">储蓄卡总数</div>
|
||||
<div class="num">{{ debitCount }}<span>张</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="./assets/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">股票账户总数</div>
|
||||
<div class="num">{{ stocksCount }}<span>个</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">期货账户总数</div>
|
||||
<div class="num">{{ futuresCount }}<span>个</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">人情总数</div>
|
||||
<div class="num">{{ peopleLendCount }}<span>人</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="./assets/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">网贷总数</div>
|
||||
<div class="num">{{ onlineLendCount }}<span>个</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup name="facilityType">
|
||||
import { getBaseAccountInfo, getDebetInfo, getIncomeInfo, getCreditInfo } from '@/api/invest/accountAnalysis.js'
|
||||
import { getCreditRecordAnalysis } from '@/api/invest/creditQueryRecord'
|
||||
|
||||
//投资收益
|
||||
const futuresIncome = ref(0)
|
||||
const totalIncome = ref(0)
|
||||
const stocksIncome = ref(0)
|
||||
const investBalance = ref(0)
|
||||
|
||||
//基础信息
|
||||
const posCount = ref(0)
|
||||
const debitCount = ref(0)
|
||||
const stocksCount = ref(0)
|
||||
const futuresCount = ref(0)
|
||||
const peopleLendCount = ref(0)
|
||||
const onlineLendCount = ref(0)
|
||||
const creditCount = ref(0)
|
||||
|
||||
//网贷信息-公共
|
||||
const creditInstallmentHistory = ref(0)
|
||||
const peopleLendHistory = ref(0)
|
||||
const totalDebt = ref(0)
|
||||
const debetBalance = ref(0)
|
||||
const netAsset = ref(0)
|
||||
|
||||
//网贷信息
|
||||
const unclearedOnlineDebtCount = ref(0)
|
||||
const unClearedOnlineDebt = ref(0)
|
||||
const unClearedOnlineDebtPrinciple = ref(0)
|
||||
const unClearedOnlineDebtInterest = ref(0)
|
||||
const clearedOnlineDebtCount = ref(0)
|
||||
const clearedOnlineDebt = ref(0)
|
||||
const clearedOnlineDebtPrinciple = ref(0)
|
||||
const clearedOnlineDebtInterest = ref(0)
|
||||
const dueOnlineDebt = ref(0)
|
||||
const repaidOnlineDebt = ref(0)
|
||||
const leftOnlineDebt = ref(0)
|
||||
|
||||
//信用卡信息
|
||||
|
||||
const currentCreditBill = ref(0)
|
||||
const creditInstallment = ref(0)
|
||||
const creditLimit = ref(0)
|
||||
const lastSixMonthUsedLimit = ref(0)
|
||||
const lastSixMonthUsedRate = ref(0)
|
||||
const lastMonthUsedLimit = ref(0)
|
||||
const lastMonthUsedRate = ref(0)
|
||||
const creditBalance = ref(0)
|
||||
const creditAvailableLimit = ref(0)
|
||||
const creditBillRate = ref(0)
|
||||
const unclearedCreditInstallmentCount = ref(0)
|
||||
const unclearedCreditInstallment = ref(0)
|
||||
const unclearedCreditInstallmentPrinciple = ref(0)
|
||||
const unclearedCreditInstallmentInterest = ref(0)
|
||||
const clearedCreditInstallmentCount = ref(0)
|
||||
const clearedCreditInstallmentDebt = ref(0)
|
||||
const clearedCreditInstallmentPrinciple = ref(0)
|
||||
const clearedCreditInstallmentInterest = ref(0)
|
||||
|
||||
//征信信息
|
||||
const lastOneMonths = ref(0)
|
||||
const lastTwoMonths = ref(0)
|
||||
const lastThreeMonths = ref(0)
|
||||
const lastSixMonths = ref(0)
|
||||
const lastOneYears = ref(0)
|
||||
const lastTwoYears = ref(0)
|
||||
const lastAllYears = ref(0)
|
||||
const lastSixMonthQueryCount = ref(0)
|
||||
const lastSixMonthsAfterLoan = ref(0)
|
||||
const lastTwoYearsAfterLoan = ref(0)
|
||||
const totalAfterLoan = ref(0)
|
||||
|
||||
const getIncomeInfoData = () => {
|
||||
getIncomeInfo().then((res) => {
|
||||
totalIncome.value = res.data.totalIncome
|
||||
futuresIncome.value = res.data.futuresIncome
|
||||
stocksIncome.value = res.data.stocksIncome
|
||||
investBalance.value = res.data.investBalance
|
||||
})
|
||||
}
|
||||
|
||||
const getBaseAccountInfoData = () => {
|
||||
getBaseAccountInfo().then((res) => {
|
||||
posCount.value = res.data.posCount
|
||||
creditCount.value = res.data.creditCount
|
||||
debitCount.value = res.data.debitCount
|
||||
stocksCount.value = res.data.stocksCount
|
||||
futuresCount.value = res.data.futuresCount
|
||||
peopleLendCount.value = res.data.peopleLendCount
|
||||
onlineLendCount.value = res.data.onlineLendCount
|
||||
})
|
||||
}
|
||||
|
||||
const getCreditInfoData = () => {
|
||||
getCreditInfo().then((res) => {
|
||||
currentCreditBill.value = res.data.currentCreditBill
|
||||
creditInstallment.value = res.data.creditInstallment
|
||||
creditLimit.value = res.data.creditLimit
|
||||
lastSixMonthUsedLimit.value = res.data.lastSixMonthUsedLimit
|
||||
lastSixMonthUsedRate.value = res.data.lastSixMonthUsedRate
|
||||
lastMonthUsedLimit.value = res.data.lastMonthUsedLimit
|
||||
lastMonthUsedRate.value = res.data.lastMonthUsedRate
|
||||
creditBalance.value = res.data.creditBalance
|
||||
creditAvailableLimit.value = res.data.creditAvailableLimit
|
||||
creditBillRate.value = res.data.creditBillRate
|
||||
unclearedCreditInstallmentCount.value = res.data.unclearedCreditInstallmentCount
|
||||
unclearedCreditInstallment.value = res.data.unclearedCreditInstallment
|
||||
unclearedCreditInstallmentPrinciple.value = res.data.unclearedCreditInstallmentPrinciple
|
||||
unclearedCreditInstallmentInterest.value = res.data.unclearedCreditInstallmentInterest
|
||||
clearedCreditInstallmentCount.value = res.data.clearedCreditInstallmentCount
|
||||
clearedCreditInstallmentDebt.value = res.data.clearedCreditInstallmentDebt
|
||||
clearedCreditInstallmentPrinciple.value = res.data.clearedCreditInstallmentPrinciple
|
||||
clearedCreditInstallmentInterest.value = res.data.clearedCreditInstallmentInterest
|
||||
})
|
||||
}
|
||||
const getDebetInfoData = () => {
|
||||
getDebetInfo().then((res) => {
|
||||
unClearedOnlineDebt.value = res.data.unClearedOnlineDebt
|
||||
creditInstallmentHistory.value = res.data.creditInstallmentHistory
|
||||
totalDebt.value = res.data.totalDebt
|
||||
netAsset.value = res.data.netAsset
|
||||
debetBalance.value = res.data.debetBalance
|
||||
peopleLendHistory.value = res.data.peopleLendHistory
|
||||
unclearedOnlineDebtCount.value = res.data.unclearedOnlineDebtCount
|
||||
clearedOnlineDebtCount.value = res.data.clearedOnlineDebtCount
|
||||
clearedOnlineDebt.value = res.data.clearedOnlineDebt
|
||||
dueOnlineDebt.value = res.data.dueOnlineDebt
|
||||
repaidOnlineDebt.value = res.data.repaidOnlineDebt
|
||||
leftOnlineDebt.value = res.data.leftOnlineDebt
|
||||
unClearedOnlineDebtPrinciple.value = res.data.unClearedOnlineDebtPrinciple
|
||||
unClearedOnlineDebtInterest.value = res.data.unClearedOnlineDebtInterest
|
||||
clearedOnlineDebtPrinciple.value = res.data.clearedOnlineDebtPrinciple
|
||||
clearedOnlineDebtInterest.value = res.data.clearedOnlineDebtInterest
|
||||
})
|
||||
}
|
||||
const getCreditRecordAnalysisData = () => {
|
||||
getCreditRecordAnalysis().then((res) => {
|
||||
lastOneMonths.value = res.data.lastOneMonths
|
||||
lastTwoMonths.value = res.data.lastTwoMonths
|
||||
lastThreeMonths.value = res.data.lastThreeMonths
|
||||
lastSixMonths.value = res.data.lastSixMonths
|
||||
lastOneYears.value = res.data.lastOneYears
|
||||
lastTwoYears.value = res.data.lastTwoYears
|
||||
lastAllYears.value = res.data.lastAllYears
|
||||
lastSixMonthQueryCount.value = res.data.lastSixMonthQueryCount
|
||||
lastSixMonthsAfterLoan.value = res.data.lastSixMonthsAfterLoan
|
||||
lastTwoYearsAfterLoan.value = res.data.lastTwoYearsAfterLoan
|
||||
totalAfterLoan.value = res.data.totalAfterLoan
|
||||
})
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
getIncomeInfoData()
|
||||
getBaseAccountInfoData()
|
||||
getCreditInfoData()
|
||||
getDebetInfoData()
|
||||
getCreditRecordAnalysisData()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 120px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 20%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 30px 60px 30px 60px;
|
||||
.title {
|
||||
margin-left: 20px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 20px;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
495
src/pages/statistic/accounts/accountDealAnalysis/index.vue
Normal file
495
src/pages/statistic/accounts/accountDealAnalysis/index.vue
Normal file
@@ -0,0 +1,495 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" placeholder="" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">交易时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收支差额</div>
|
||||
<div class="num">{{ account.balance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">工资收益</div>
|
||||
<div class="num">{{ account.salaryIncome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">投资盈利</div>
|
||||
<div class="num">{{ account.investIncome}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">投资亏损</div>
|
||||
<div class="num">{{ account.investOutcome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出总额</div>
|
||||
<div class="num">{{ account.totalOutcome}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">日常支出</div>
|
||||
<div class="num">{{ account.dailyExpenses }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">手续费利息支出</div>
|
||||
<div class="num">{{ account.notDailyExpenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS机刷卡手续费</div>
|
||||
<div class="num">{{ account.posExpenses }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡分期利息</div>
|
||||
<div class="num">{{ account.creditInterest}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">网贷利息</div>
|
||||
<div class="num">{{ account.onLineInterest }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.time+' 收支金额:'+item.value" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">收支明细:</text>
|
||||
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAcccountsOutInAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import dayjs from 'dayjs'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
expenses: '',
|
||||
incomeCount: '',
|
||||
expensesCount: '',
|
||||
posExpensesCount: '',
|
||||
posExpenses: '',
|
||||
realExpenses: '',
|
||||
realExpensesCount: '',
|
||||
otherExpensesCount: '',
|
||||
acccountsList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
id: null
|
||||
}
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '')
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
}
|
||||
function getList() {
|
||||
getAcccountsOutInAnalysis({...queryParams.value }).then(res => {
|
||||
account.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.tableAccountsList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
388
src/pages/statistic/accounts/accountsBalance/index.vue
Normal file
388
src/pages/statistic/accounts/accountsBalance/index.vue
Normal file
@@ -0,0 +1,388 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.dataTypeName" border="false" type="select" @click="handleAccountType" placeholder="请选择账户类型" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">储蓄卡可用余额</div>
|
||||
<div class="num">{{ accountsBalance.debetBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡可用额度</div>
|
||||
<div class="num">{{ accountsBalance.creditAvailableLimit }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">信用卡余额</div>
|
||||
<div class="num">{{ accountsBalance.creditBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">投资账户余额</div>
|
||||
<div class="num">{{ accountsBalance.investBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">借贷账户余额</div>
|
||||
<div class="num">{{ accountsBalance.debitBalance }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list @scrolltolower="loadmore" :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.account+'可用余额:'+item.availableLimit" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountTypeList" keyName="dictLabel" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAccountsAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
|
||||
const accountsBalance = ref({
|
||||
debetBalance: '',
|
||||
creditAvailableLimit: '',
|
||||
creditBalance: '',
|
||||
investBalance: '',
|
||||
debitBalance: '',
|
||||
accountsBalancesList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
dataType: null,
|
||||
id: null
|
||||
}
|
||||
})
|
||||
const { filterPanel, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function getList() {
|
||||
getAccountsAnalysis({...queryParams.value }).then(res => {
|
||||
accountsBalance.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.accountsBalancesList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
// 记账类型类型
|
||||
getDicts('account_type').then(res => {
|
||||
accountTypeList.value =[res.data]
|
||||
})
|
||||
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function handleAccountType() {
|
||||
if (accountTypeList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '账户类型为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.dataTypeName = e.value[0].dictLabel
|
||||
queryParams.value.dataType= e.value[0].dictValue
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.dataTypeName = ''
|
||||
queryParams.value.dataType=''
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
552
src/pages/statistic/accounts/creditCardDealAnalysis/index.vue
Normal file
552
src/pages/statistic/accounts/creditCardDealAnalysis/index.vue
Normal file
@@ -0,0 +1,552 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择信用卡" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">交易时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">交易金额</div>
|
||||
<div class="num">{{ account.amount }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收入金额</div>
|
||||
<div class="num">{{ account.income }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出金额</div>
|
||||
<div class="num">{{ account.expenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收入笔数</div>
|
||||
<div class="num">{{ account.incomeCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出笔数</div>
|
||||
<div class="num">{{ account.expensesCount}}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS刷卡支出</div>
|
||||
<div class="num">{{ account.posExpenses }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">真实消费支出</div>
|
||||
<div class="num">{{ account.realExpenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS刷卡笔数</div>
|
||||
<div class="num">{{ account.posExpensesCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">真实消费支出笔数</div>
|
||||
<div class="num">{{ account.realExpensesCount}}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">其他支出笔数</div>
|
||||
<div class="num">{{ account.otherExpensesCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.time+' 交易金额:'+item.value" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易明细:</text>
|
||||
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="nameCode" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAcccountsDealAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import dayjs from 'dayjs'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const accountTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
expenses: '',
|
||||
incomeCount: '',
|
||||
expensesCount: '',
|
||||
posExpensesCount: '',
|
||||
posExpenses: '',
|
||||
realExpenses: '',
|
||||
realExpensesCount: '',
|
||||
otherExpensesCount: '',
|
||||
acccountsList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '2',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
dataType: '2',
|
||||
id: null
|
||||
}
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '')
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
getAcccountsDealAnalysis({...queryParams.value }).then(res => {
|
||||
account.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.tableAccountsList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '储蓄卡为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].nameCode
|
||||
queryParams.value.id= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.id=''
|
||||
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
546
src/pages/statistic/accounts/debitDealAnalysis/index.vue
Normal file
546
src/pages/statistic/accounts/debitDealAnalysis/index.vue
Normal file
@@ -0,0 +1,546 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择储蓄账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">交易时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">交易金额</div>
|
||||
<div class="num">{{ account.amount }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收入金额</div>
|
||||
<div class="num">{{ account.income }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出金额</div>
|
||||
<div class="num">{{ account.expenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收入笔数</div>
|
||||
<div class="num">{{ account.incomeCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出笔数</div>
|
||||
<div class="num">{{ account.expensesCount}}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS刷卡收入</div>
|
||||
<div class="num">{{ account.posIncome }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">真实消费支出</div>
|
||||
<div class="num">{{ account.realExpenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">POS收入笔数</div>
|
||||
<div class="num">{{ account.posIncomeCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">真实消费支出笔数</div>
|
||||
<div class="num">{{ account.realExpensesCount}}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">支出笔数</div>
|
||||
<div class="num">{{ account.otherExpensesCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.time+' 交易金额:'+item.value" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">交易明细:</text>
|
||||
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="nameCode" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAcccountsDealAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import dayjs from 'dayjs'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const accountTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
expenses: '',
|
||||
incomeCount: '',
|
||||
expensesCount: '',
|
||||
acccountsList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '1',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
dataType: '1',
|
||||
id: null
|
||||
}
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '')
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
getAcccountsDealAnalysis({...queryParams.value }).then(res => {
|
||||
account.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.tableAccountsList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-7, 'day')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '储蓄卡为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].nameCode
|
||||
queryParams.value.id= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.id=''
|
||||
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
510
src/pages/statistic/accounts/investDealAnalysis/index.vue
Normal file
510
src/pages/statistic/accounts/investDealAnalysis/index.vue
Normal file
@@ -0,0 +1,510 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择投资账户" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">交易时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">收益金额</div>
|
||||
<div class="num">{{ account.amount }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">盈利金额</div>
|
||||
<div class="num">{{ account.income }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">亏损金额</div>
|
||||
<div class="num">{{ account.expenses}}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">盈利笔数</div>
|
||||
<div class="num">{{ account.incomeCount }}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">亏损笔数</div>
|
||||
<div class="num">{{ account.expensesCount}}<span>笔</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.time+' 收益金额:'+item.value" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">收益明细:</text>
|
||||
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="nameCode" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getAcccountsDealAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import dayjs from 'dayjs'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const accountTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const account = ref({
|
||||
amount: '',
|
||||
income: '',
|
||||
expenses: '',
|
||||
incomeCount: '',
|
||||
expensesCount: '',
|
||||
acccountsList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '5',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
dataType: '5',
|
||||
dealCategory: '2',
|
||||
id: null
|
||||
}
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '')
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
queryParams.value.accountName = ''
|
||||
}
|
||||
function getList() {
|
||||
getAcccountsDealAnalysis({...queryParams.value }).then(res => {
|
||||
account.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.tableAccountsList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-01'
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: '储蓄卡为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].nameCode
|
||||
queryParams.value.id= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.id=''
|
||||
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
497
src/pages/statistic/accounts/posAnalysis/index.vue
Normal file
497
src/pages/statistic/accounts/posAnalysis/index.vue
Normal file
@@ -0,0 +1,497 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.accountName" border="false" type="select" @click="handleAccount" placeholder="请选择POS机" suffixIcon="search"
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<u-sticky offsetTop="8rpx" customNavHeight="8rpx">
|
||||
<view class="search-view">
|
||||
<u-input v-model="queryParams.time" border="false" type="select" readonly
|
||||
suffixIconStyle="color: #909399" class="search-input">
|
||||
</u-input>
|
||||
<u-icon :name="filterPanel ? 'arrow-up-fill' : 'arrow-down-fill'" color="#666666" size="28" label="筛选"
|
||||
labelPos="left" labelSize="32rpx" labelColor="#666666" @click="filterPanel = !filterPanel"></u-icon>
|
||||
<u-transition :show="filterPanel" mode="fade">
|
||||
<view class="filter-panel" :style="{ height: `${windowHeight - 42}px` }">
|
||||
<view class="filter-panel-content">
|
||||
|
||||
<view class="select-header">刷卡时间</view>
|
||||
<view class="selcet-content" style="padding: 0 24rpx">
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.startTime"
|
||||
placeholder="请选择开始时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(true)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
<u-input
|
||||
:disabled="true"
|
||||
:disabledColor="'#fff'"
|
||||
class="dateInput"
|
||||
border="surround"
|
||||
v-model="queryParams.endTime"
|
||||
placeholder="请选择结束时间"
|
||||
>
|
||||
<template v-slot:suffix>
|
||||
<u-icon name="calendar" @click="openOrCloseDate(false)"></u-icon>
|
||||
</template>
|
||||
</u-input>
|
||||
</view>
|
||||
</view>
|
||||
<view class="btn-box">
|
||||
<u-button text="重置" style="margin-right:20rpx" @click="resetQuery()"></u-button>
|
||||
<u-button type="primary" text="确定" @click="searchSubmit()"></u-button>
|
||||
</view>
|
||||
<u-datetime-picker
|
||||
:closeOnClickOverlay="true"
|
||||
:show="timeShow"
|
||||
v-model="time"
|
||||
mode="date"
|
||||
@close="openOrCloseDate"
|
||||
@cancel="openOrCloseDate"
|
||||
@confirm="confirm"
|
||||
></u-datetime-picker>
|
||||
</view>
|
||||
</u-transition>
|
||||
</view>
|
||||
</u-sticky>
|
||||
<div class="app-container" style="overflow: auto">
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/one.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">刷卡金额</div>
|
||||
<div class="num">{{ pos.amount }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/ticketSum.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">刷卡手续费</div>
|
||||
<div class="num">{{ pos.commission }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-con" ref="searchHeightRef">
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTickets.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">入账金额</div>
|
||||
<div class="num">{{ pos.actualAmount }}<span>元</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<img src="@/static/images/completionTime.png" alt="" />
|
||||
<div class="info-sum">
|
||||
<div class="title">刷卡次数</div>
|
||||
<div class="num">{{ pos.count }}<span>次</span></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<u-list :spaceHeight="116" lowerThreshold="100">
|
||||
<u-list-item v-for="(item, index) in listData" :key="index">
|
||||
<view class="list-item">
|
||||
<view class="item-header">
|
||||
<u--text lines="1"
|
||||
:text="item.time+' 刷卡金额:'+item.value" size="30rpx" color="#333333" ></u--text>
|
||||
</view>
|
||||
<view class="item-row">
|
||||
<text class="row-label">刷卡明细:</text>
|
||||
<text class="row-value">{{ formatMultiLineData(item.detail)}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</u-list-item>
|
||||
<view>
|
||||
</view>
|
||||
</u-list>
|
||||
<u-picker itemHeight="88" :show="settingPickShow" :columns="settingColumns" keyName="settingName"
|
||||
@confirm="settingConfirm" @cancel="settingCancel"></u-picker>
|
||||
<u-picker itemHeight="88" :show="showAccount" :columns="accountList" keyName="nameCode" @cancel="handleAccountCancel"
|
||||
@confirm="handleAccountConfirm"></u-picker>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { getPosAnalysis } from '@/api/invest/statisticAnalysis'
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import dayjs from 'dayjs'
|
||||
import { timeHandler } from '@/utils/common.ts'
|
||||
import { listAccounts } from '@/api/invest/accounts'
|
||||
import {onLoad,onShow} from "@dcloudio/uni-app";
|
||||
// 计算属性与监听属性是在vue中而非uniap中 需要注意!!!
|
||||
import {reactive ,toRefs,ref,computed }from "vue";
|
||||
const pageNum = ref(1)
|
||||
const listData = ref([])
|
||||
const isShow = ref(false)
|
||||
const accountList = ref([])
|
||||
const accountTypeList = ref([])
|
||||
const settingPickShow = ref(false)
|
||||
const settingColumns = ref([])
|
||||
const showAccount = ref(false)
|
||||
const timeShow= ref(false)
|
||||
const time =ref( Number(new Date()))
|
||||
const flag= ref(true)
|
||||
const pos = ref({
|
||||
amount: '',
|
||||
commission: '',
|
||||
actualAmount: '',
|
||||
count: '',
|
||||
posList: []
|
||||
})
|
||||
const data = reactive({
|
||||
filterPanel: false,
|
||||
queryAccountParams: {
|
||||
pageNum: 1,
|
||||
state: '1',
|
||||
type: '6',
|
||||
pageSize: 100
|
||||
},
|
||||
queryParams: {
|
||||
type: 1,
|
||||
time: null,
|
||||
dataType: null,
|
||||
id: null
|
||||
}
|
||||
})
|
||||
|
||||
const { filterPanel, queryAccountParams, queryParams} = toRefs(data)
|
||||
const windowHeight = computed(() => {
|
||||
uni.getSystemInfoSync().windowHeight - 50
|
||||
})
|
||||
onLoad(() => {
|
||||
getDict()
|
||||
getList()
|
||||
});
|
||||
|
||||
onShow(() => {
|
||||
if (isShow.value) {
|
||||
getList()
|
||||
isShow.value = false
|
||||
}
|
||||
});
|
||||
|
||||
function formatMultiLineData(data) {
|
||||
if (data != null) {
|
||||
return data.replace(/<br\/>/g, '')
|
||||
}
|
||||
}
|
||||
function openOrCloseDate(data) {
|
||||
timeShow.value = !timeShow.value
|
||||
flag.value = data
|
||||
}
|
||||
function confirm(e) {
|
||||
const date = timeHandler(new Date(e.value), '-', ':')
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
dayjs(date).format(formatValue)
|
||||
if (flag.value) {
|
||||
queryParams.value.startTime = dayjs(date).format(formatValue)
|
||||
} else {
|
||||
queryParams.value.endTime = dayjs(date).format(formatValue)
|
||||
}
|
||||
timeShow.value = false
|
||||
}
|
||||
function searchSubmit() {
|
||||
queryParams.value.time = queryParams.value.startTime+'-'+queryParams.value.endTime
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
function resetQuery() {
|
||||
queryParams.value.id = ''
|
||||
queryParams.value.type = '1'
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-1, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
}
|
||||
function getList() {
|
||||
|
||||
getPosAnalysis({...queryParams.value }).then(res => {
|
||||
pos.value = { ...res.data }
|
||||
listData.value = listData.value.concat(res.data.tablePosList)
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
function getDict() {
|
||||
let formatValue = 'YYYY-MM-DD'
|
||||
const today = new Date()
|
||||
const end = today.getFullYear() + '-' + ('0' + (today.getMonth() + 1)).slice(-2) + '-' + ('0' + today.getDate()).slice(-2)
|
||||
const start = dayjs(end).add(-1, 'months')
|
||||
queryParams.value.startTime = dayjs(start).format(formatValue)
|
||||
queryParams.value.endTime = dayjs(end).format(formatValue)
|
||||
queryParams.value.time = dayjs(start).format(formatValue)+'-'+dayjs(end).format(formatValue)
|
||||
listAccounts(queryAccountParams.value).then((response) => {
|
||||
accountList.value = [response.rows]
|
||||
})
|
||||
|
||||
}
|
||||
function settingConfirm(e) {
|
||||
queryParams.value.settingId = e.value[0].settingId
|
||||
queryParams.value.settingName = e.value[0].settingName
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function settingCancel() {
|
||||
settingPickShow.value = false
|
||||
}
|
||||
function handleAccount() {
|
||||
if (accountList.value[0].length === 0) {
|
||||
proxy.$refs['uToast'].show({
|
||||
message: 'POS机为空 ', type: 'warning'
|
||||
})
|
||||
} else {
|
||||
showAccount.value = true
|
||||
}
|
||||
}
|
||||
function handleAccountConfirm(e) {
|
||||
queryParams.value.accountName = e.value[0].nameCode
|
||||
queryParams.value.id= e.value[0].id
|
||||
showAccount.value = false
|
||||
pageNum.value = 1
|
||||
listData.value = []
|
||||
getList()
|
||||
}
|
||||
function handleAccountCancel() {
|
||||
queryParams.value.accountName = ''
|
||||
queryParams.value.id=''
|
||||
|
||||
showAccount.value = false
|
||||
listData.value = []
|
||||
getList()
|
||||
filterPanel.value = false
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
.app-container {
|
||||
.header-con {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
.item {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
position: relative;
|
||||
align-items: center;
|
||||
margin: 5px 10px 5px 10px;
|
||||
.title {
|
||||
margin-left: 10px;
|
||||
color: rgb(133, 133, 148);
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
}
|
||||
.num {
|
||||
margin-left: 10px;
|
||||
font-weight: bold;
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
img {
|
||||
height: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
.header-title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
background-color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
.btnAdd {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
display:float;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.search-view {
|
||||
padding: 12rpx 32rpx;
|
||||
background-color: #ffffff;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
|
||||
.search-input {
|
||||
background: #F5F5F5;
|
||||
color: #333333;
|
||||
margin-right: 36rpx;
|
||||
}
|
||||
|
||||
.filter-panel {
|
||||
width: 100%;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 96rpx;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
|
||||
.filter-panel-content {
|
||||
background-color: #ffff;
|
||||
padding: 0 30rpx 30rpx;
|
||||
|
||||
.filter-title {
|
||||
color: #000000;
|
||||
font-size: 30rpx;
|
||||
font-weight: 500;
|
||||
padding: 30rpx 0;
|
||||
}
|
||||
|
||||
.state-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;
|
||||
|
||||
.state-item {
|
||||
width: 210rpx;
|
||||
height: 72rpx;
|
||||
border: 1rpx solid rgba(0, 0, 0, 0.25);
|
||||
border-radius: 72rpx;
|
||||
text-align: center;
|
||||
line-height: 72rpx;
|
||||
margin: 0 20rpx 20rpx 0;
|
||||
font-size: 28rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.active {
|
||||
background-color: rgba(222, 241, 255, 1);
|
||||
border: 1rpx solid rgba(22, 119, 255, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.btn-box {
|
||||
display: flex;
|
||||
padding: 24rpx 30rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0rpx -10rpx 20rpx #EEEEEE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.list-item {
|
||||
margin: 0 24rpx 24rpx;
|
||||
padding: 32rpx;
|
||||
background-color: #fff;
|
||||
|
||||
.item-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding-bottom: 16rpx;
|
||||
|
||||
.status {
|
||||
.status-item {
|
||||
width: 120rpx;
|
||||
height: 44rpx;
|
||||
text-align: center;
|
||||
line-height: 44rpx;
|
||||
border-radius: 4rpx;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.status1 {
|
||||
background: #F0F0F0;
|
||||
color: #8C8C8C;
|
||||
}
|
||||
|
||||
.status2 {
|
||||
background: rgba(38, 129, 255, 0.2);
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status3 {
|
||||
background: #F7F7F7;
|
||||
color: #2681FF;
|
||||
}
|
||||
|
||||
.status4 {
|
||||
background: rgba(255, 85, 51, 0.2);
|
||||
color: #FF5533;
|
||||
}
|
||||
|
||||
.status5 {
|
||||
background: #F7F7F7;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.status7 {
|
||||
background: rgba(255, 129, 51, 0.2);
|
||||
color: #FF8133;
|
||||
}
|
||||
|
||||
.status8 {
|
||||
background: rgba(65, 217, 165, 0.2);
|
||||
color: #41D9A5;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.item-row {
|
||||
padding: 16rpx 0;
|
||||
|
||||
.row-label {
|
||||
color: rgba(0, 0, 0, 0.55);
|
||||
}
|
||||
|
||||
.row-value {
|
||||
color: rgba(0, 0, 0, 0.85)
|
||||
}
|
||||
}
|
||||
|
||||
.operate {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
|
||||
.btn {
|
||||
width: 146rpx;
|
||||
height: 56rpx;
|
||||
line-height: 56rpx;
|
||||
border-radius: 8rpx;
|
||||
margin-left: 5rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.circulation {
|
||||
background: rgba(0, 0, 0, 0.04);
|
||||
margin-right: 24rpx;
|
||||
color: rgba(0, 0, 0, 0.85);
|
||||
}
|
||||
|
||||
.filling {
|
||||
background: #2681FF;
|
||||
border-radius: 8rpx;
|
||||
color: #FFFFFF;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user