fix: 信用卡账单新增账单明细,首页增加投资账户余额。
This commit is contained in:
@@ -23,6 +23,13 @@
|
|||||||
<div class="num">{{ debetBalance }}<span>元</span></div>
|
<div class="num">{{ debetBalance }}<span>元</span></div>
|
||||||
</div>
|
</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>
|
||||||
<div class="header-con" ref="searchHeightRef">
|
<div class="header-con" ref="searchHeightRef">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
@@ -49,6 +56,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="header-title" ref="searchHeightRef"> 投资收益</div>
|
<div class="header-title" ref="searchHeightRef"> 投资收益</div>
|
||||||
<div class="header-con" ref="searchHeightRef">
|
<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">
|
<div class="item">
|
||||||
<img src="./assets/one.png" alt="" />
|
<img src="./assets/one.png" alt="" />
|
||||||
<div class="info-sum">
|
<div class="info-sum">
|
||||||
@@ -70,13 +84,6 @@
|
|||||||
<div class="num">{{ stocksIncome }}<span>元</span></div>
|
<div class="num">{{ stocksIncome }}<span>元</span></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="item">
|
|
||||||
<img src="./assets/completionTime.png" alt="" />
|
|
||||||
<div class="info-sum">
|
|
||||||
<div class="title">其他收益</div>
|
|
||||||
<div class="num">{{ otherIncome }}<span>元</span></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="header-title" ref="searchHeightRef"> 网贷信息</div>
|
<div class="header-title" ref="searchHeightRef"> 网贷信息</div>
|
||||||
<div class="header-con" ref="searchHeightRef">
|
<div class="header-con" ref="searchHeightRef">
|
||||||
@@ -445,7 +452,7 @@ import { getCreditRecordAnalysis } from '@/api/invest/creditQueryRecord'
|
|||||||
const futuresIncome = ref(0)
|
const futuresIncome = ref(0)
|
||||||
const totalIncome = ref(0)
|
const totalIncome = ref(0)
|
||||||
const stocksIncome = ref(0)
|
const stocksIncome = ref(0)
|
||||||
const otherIncome = ref(0)
|
const investBalance = ref(0)
|
||||||
|
|
||||||
//基础信息
|
//基础信息
|
||||||
const posCount = ref(0)
|
const posCount = ref(0)
|
||||||
@@ -515,7 +522,7 @@ const getIncomeInfoData = () => {
|
|||||||
totalIncome.value = res.data.totalIncome
|
totalIncome.value = res.data.totalIncome
|
||||||
futuresIncome.value = res.data.futuresIncome
|
futuresIncome.value = res.data.futuresIncome
|
||||||
stocksIncome.value = res.data.stocksIncome
|
stocksIncome.value = res.data.stocksIncome
|
||||||
otherIncome.value = res.data.otherIncome
|
investBalance.value = res.data.investBalance
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,16 +91,71 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog :title="titleDealRecord" v-model="openDealRecord" width="1200px" append-to-body destroy-on-close>
|
||||||
|
<el-form :model="queryDealRecordParams" ref="queryDealRecordRef" inline>
|
||||||
|
<el-form-item label="账单周期" prop="time">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="queryDealRecordParams.time"
|
||||||
|
type="daterange"
|
||||||
|
disabled
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始时间"
|
||||||
|
end-placeholder="结束时间"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="交易类型" style="width: 220px" prop="dealType">
|
||||||
|
<el-select v-model="queryDealRecordParams.dealType" placeholder="请选择交易类型" clearable>
|
||||||
|
<el-option v-for="dict in deal_type" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="交易类别" style="width: 220px" prop="dealCategory">
|
||||||
|
<el-select v-model="queryDealRecordParams.dealCategory" placeholder="请选择交易类别" clearable>
|
||||||
|
<el-option v-for="dict in deal_category" :key="dict.value" :label="dict.label" :value="dict.value" />
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="">
|
||||||
|
<el-button type="primary" icon="Search" @click="handleDealRecordQuery">搜索</el-button>
|
||||||
|
<el-button type="info" icon="Refresh" @click="resetDealRecordQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<el-table v-loading="loadingDealRecord" :data="tableDealRecordData">
|
||||||
|
<el-table-column label="交易时间" align="center" prop="createTime" />
|
||||||
|
<el-table-column label="交易金额" align="center" prop="amount" />
|
||||||
|
<el-table-column label="当前余额" align="center" prop="currentBalance" />
|
||||||
|
<el-table-column label="交易类型" align="center" prop="dealType">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="deal_type" :value="scope.row.dealType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="交易类别" align="center" prop="dealCategory">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="deal_category" :value="scope.row.dealCategory" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="备注" align="center" width="380" prop="remark" />
|
||||||
|
</el-table>
|
||||||
|
<el-pagination small background layout="total, prev, pager, next" :total="dealRecordTotal" @current-change="handleCurrentDealRecordChange" />
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup name="CreditCardBill">
|
<script setup name="CreditCardBill">
|
||||||
import { listCreditCardBill, getCreditCardBill, delCreditCardBill, addCreditCardBill, updateCreditCardBill } from '@/api/invest/creditCardBill'
|
import { listCreditCardBill, getCreditCardBill, delCreditCardBill, addCreditCardBill, updateCreditCardBill } from '@/api/invest/creditCardBill'
|
||||||
import { listBankcardLend } from '@/api/invest/bankcardlend'
|
import { listBankcardLend } from '@/api/invest/bankcardlend'
|
||||||
|
import { listAccountDealRecord } from '@/api/invest/accountDealRecord'
|
||||||
|
import dayjs from 'dayjs'
|
||||||
// eslint-disable-next-line no-unused-vars
|
// eslint-disable-next-line no-unused-vars
|
||||||
import { require } from '@/utils/require'
|
import { require } from '@/utils/require'
|
||||||
const { proxy } = getCurrentInstance()
|
const { proxy } = getCurrentInstance()
|
||||||
const { bill_state } = proxy.useDict('bill_state')
|
const { account_state, account_type, deal_type, deal_category, debit_type, transfer_type, bill_state } = proxy.useDict(
|
||||||
|
'account_state',
|
||||||
|
'account_type',
|
||||||
|
'deal_type',
|
||||||
|
'deal_category',
|
||||||
|
'debit_type',
|
||||||
|
'transfer_type',
|
||||||
|
'bill_state'
|
||||||
|
)
|
||||||
const creditCardBillList = ref([])
|
const creditCardBillList = ref([])
|
||||||
const open = ref(false)
|
const open = ref(false)
|
||||||
const loading = ref(true)
|
const loading = ref(true)
|
||||||
@@ -111,10 +166,27 @@ const multiple = ref(true)
|
|||||||
const total = ref(0)
|
const total = ref(0)
|
||||||
const creditCardList = ref([])
|
const creditCardList = ref([])
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
|
|
||||||
|
const titleDealRecord = ref('')
|
||||||
|
const openDealRecord = ref(false)
|
||||||
|
const currentAccountId = ref(false)
|
||||||
|
const loadingDealRecord = ref(false)
|
||||||
|
const tableDealRecordData = ref([])
|
||||||
|
const dealRecordTotal = ref(0)
|
||||||
|
|
||||||
|
const queryDealRecordParams = ref({
|
||||||
|
time: '',
|
||||||
|
dealType: null,
|
||||||
|
dealCategory: null,
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10
|
||||||
|
})
|
||||||
|
|
||||||
const operateList = ref([
|
const operateList = ref([
|
||||||
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['invest:creditCardBill:query'] },
|
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['invest:creditCardBill:query'] },
|
||||||
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['invest:creditCardBill:edit'] },
|
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['invest:creditCardBill:edit'] },
|
||||||
{ id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['invest:creditCardBill:remove'] }
|
{ id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['invest:creditCardBill:remove'] },
|
||||||
|
{ id: 'detail', icon: 'Tickets', title: '账单明细', hasPermi: ['invest:creditCardBill:query'] }
|
||||||
])
|
])
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
form: {},
|
form: {},
|
||||||
@@ -128,7 +200,7 @@ const data = reactive({
|
|||||||
queryCreditCardParams: {
|
queryCreditCardParams: {
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
type: '2',
|
type: '2',
|
||||||
pageSize: 1000
|
pageSize: 10
|
||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
billDate: [{ required: true, message: '账单日不能为空', trigger: 'blur' }],
|
billDate: [{ required: true, message: '账单日不能为空', trigger: 'blur' }],
|
||||||
@@ -149,6 +221,9 @@ const handleOperate = (operate, row) => {
|
|||||||
case 'delete':
|
case 'delete':
|
||||||
handleDelete(row)
|
handleDelete(row)
|
||||||
break
|
break
|
||||||
|
case 'detail':
|
||||||
|
handleDealRecord(row)
|
||||||
|
break
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -232,6 +307,55 @@ const handleView = (row) => {
|
|||||||
open.value = true
|
open.value = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** 历史数据按钮操作 */
|
||||||
|
function handleDealRecord(row) {
|
||||||
|
const _id = row.creditCardId
|
||||||
|
queryDealRecordParams.value.time = row.billDatePeriod.split('~')
|
||||||
|
queryDealRecordParams.value.dealType = ''
|
||||||
|
queryDealRecordParams.value.dealCategory = ''
|
||||||
|
titleDealRecord.value = row.bankNameCode + '信用卡账单交易明细【' + row.billAmount + '】'
|
||||||
|
currentAccountId.value = _id
|
||||||
|
getDealRecordList(1)
|
||||||
|
openDealRecord.value = true
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleCurrentDealRecordChange = (num) => {
|
||||||
|
getDealRecordList(num)
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleDealRecordQuery = () => {
|
||||||
|
getDealRecordList(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const resetDealRecordQuery = () => {
|
||||||
|
proxy.resetForm('queryDealRecordRef')
|
||||||
|
queryDealRecordParams.value.dealType = ''
|
||||||
|
queryDealRecordParams.value.dealCategory = ''
|
||||||
|
dealRecordTotal.value = 0
|
||||||
|
getDealRecordList(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
const getDealRecordList = (num, id) => {
|
||||||
|
loadingDealRecord.value = true
|
||||||
|
|
||||||
|
const timeRange = queryDealRecordParams.value.time
|
||||||
|
let st = ''
|
||||||
|
let et = ''
|
||||||
|
if (timeRange && timeRange.length === 2) {
|
||||||
|
st = dayjs(timeRange[0]).format('YYYY-MM-DD')
|
||||||
|
et = dayjs(timeRange[1]).format('YYYY-MM-DD')
|
||||||
|
}
|
||||||
|
queryDealRecordParams.value.startTime = st
|
||||||
|
queryDealRecordParams.value.endTime = et
|
||||||
|
queryDealRecordParams.value.pageNum = num
|
||||||
|
queryDealRecordParams.value.accountId = currentAccountId.value
|
||||||
|
listAccountDealRecord(queryDealRecordParams.value).then((res) => {
|
||||||
|
loadingDealRecord.value = false
|
||||||
|
tableDealRecordData.value = res.rows
|
||||||
|
dealRecordTotal.value = res.total
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
function handleAdd() {
|
function handleAdd() {
|
||||||
reset()
|
reset()
|
||||||
|
|||||||
Reference in New Issue
Block a user