fix: 功能修复,账号相关,新增交易明细记录。
This commit is contained in:
@@ -73,7 +73,7 @@
|
||||
<dict-tag :options="account_status" :value="scope.row.status" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="165" align="center" class-name="small-padding fixed-width">
|
||||
<el-table-column label="操作" width="210" align="center" class-name="small-padding fixed-width">
|
||||
<template v-slot="scope">
|
||||
<div class="ctrl-btn d-flex">
|
||||
<el-tooltip v-for="item in operateList" :key="item.id" class="item" effect="dark" :content="item.title" placement="top">
|
||||
@@ -265,6 +265,46 @@
|
||||
</div>
|
||||
<template #footer> </template>
|
||||
</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" 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" width="180" />
|
||||
<el-table-column label="交易金额" align="center" prop="amount" />
|
||||
<el-table-column label="当前余额" align="center" prop="currentBalance" />
|
||||
<el-table-column label="交易类型" width="120" align="center" prop="dealType">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="deal_type" :value="scope.row.dealType" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易类别" width="150" align="center" prop="dealCategory">
|
||||
<template #default="scope">
|
||||
<dict-tag :options="deal_category" :value="scope.row.dealCategory" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="交易子类别" width="150" align="center" prop="childCategoryName" />
|
||||
<el-table-column label="备注" align="center" width="300" prop="remark" />
|
||||
</el-table>
|
||||
<el-pagination small background layout="total, prev, pager, next" :total="dealRecordTotal" @current-change="handleCurrentDealRecordChange" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -272,11 +312,14 @@
|
||||
import { listBankcardLend, getBankcardLend, delBankcardLend, addBankcardLend, updateBankcardLend } from '@/api/invest/bankcardlend'
|
||||
import { listLimitHistory, getLimitHistory, delLimitHistory, addLimitHistory, updateLimitHistory } from '@/api/invest/limitHistory'
|
||||
import { listBankBaseInfo } from '@/api/invest/bankBaseInfo'
|
||||
import { listAccountDealRecord } from '@/api/invest/accountDealRecord'
|
||||
import dayjs from 'dayjs'
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
import { require } from '@/utils/require'
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { is_zero_bill, is_next_bill_date, account_status, card_tier } = proxy.useDict('is_zero_bill', 'is_next_bill_date', 'account_status', 'card_tier')
|
||||
const { limit_history_type, adjust_type } = proxy.useDict('limit_history_type', 'adjust_type')
|
||||
const { deal_type, deal_category } = proxy.useDict('deal_type', 'deal_category')
|
||||
const bankcardList = ref([])
|
||||
const open = ref(false)
|
||||
const loading = ref(true)
|
||||
@@ -286,6 +329,19 @@ const single = ref(true)
|
||||
const multiple = ref(true)
|
||||
const total = ref(0)
|
||||
const title = ref('')
|
||||
const titleDealRecord = ref('')
|
||||
const openDealRecord = ref(false)
|
||||
const currentAccountId = ref('')
|
||||
const loadingDealRecord = ref(false)
|
||||
const tableDealRecordData = ref([])
|
||||
const dealRecordTotal = ref(0)
|
||||
const queryDealRecordParams = ref({
|
||||
time: '',
|
||||
dealType: null,
|
||||
dealCategory: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
|
||||
const detailOpen = ref(false)
|
||||
const openDetail = ref(false)
|
||||
@@ -297,6 +353,7 @@ const bankList = ref([])
|
||||
|
||||
const operateList = ref([
|
||||
{ id: 'view', icon: 'View', title: '查看', hasPermi: ['invest:bankcard:query'] },
|
||||
{ id: 'dealRecord', icon: 'Tickets', title: '交易明细', hasPermi: ['invest:bankcard:query'] },
|
||||
{ id: 'limit', icon: 'Grid', title: '调额记录', hasPermi: ['invest:bankcard:edit'] },
|
||||
{ id: 'edit', icon: 'Edit', title: '修改', hasPermi: ['invest:bankcard:edit'] },
|
||||
{ id: 'delete', icon: 'Delete', title: '删除', hasPermi: ['invest:bankcard:remove'] }
|
||||
@@ -339,6 +396,9 @@ const data = reactive({
|
||||
|
||||
const handleOperate = (operate, row) => {
|
||||
switch (operate) {
|
||||
case 'dealRecord':
|
||||
handleDealRecord(row)
|
||||
break
|
||||
case 'limit':
|
||||
handleDetail(row)
|
||||
break
|
||||
@@ -474,6 +534,54 @@ function handleDetail(row) {
|
||||
})
|
||||
}
|
||||
|
||||
/** 交易明细按钮操作 */
|
||||
function handleDealRecord(row) {
|
||||
queryDealRecordParams.value.time = ''
|
||||
queryDealRecordParams.value.dealType = ''
|
||||
queryDealRecordParams.value.dealCategory = ''
|
||||
titleDealRecord.value = `${row.name}${row.code ? '【' + row.code + '】' : ''}交易明细`
|
||||
currentAccountId.value = row.id || ids.value
|
||||
getDealRecordList(1)
|
||||
openDealRecord.value = true
|
||||
}
|
||||
|
||||
const handleCurrentDealRecordChange = (num) => {
|
||||
getDealRecordList(num)
|
||||
}
|
||||
|
||||
const handleDealRecordQuery = () => {
|
||||
getDealRecordList(1)
|
||||
}
|
||||
|
||||
const resetDealRecordQuery = () => {
|
||||
proxy.resetForm('queryDealRecordRef')
|
||||
queryDealRecordParams.value.time = ''
|
||||
queryDealRecordParams.value.dealType = ''
|
||||
queryDealRecordParams.value.dealCategory = ''
|
||||
dealRecordTotal.value = 0
|
||||
getDealRecordList(1)
|
||||
}
|
||||
|
||||
const getDealRecordList = (num) => {
|
||||
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((response) => {
|
||||
loadingDealRecord.value = false
|
||||
tableDealRecordData.value = response.rows
|
||||
dealRecordTotal.value = response.total
|
||||
})
|
||||
}
|
||||
|
||||
/** 查询信用卡信息列表 */
|
||||
function getList() {
|
||||
loading.value = true
|
||||
|
||||
Reference in New Issue
Block a user