fix: 模块增加时间查询功能。

This commit is contained in:
tianyongbao
2024-05-08 11:19:52 +08:00
parent e959759b50
commit ab6c8df8e2
8 changed files with 131 additions and 17 deletions

View File

@@ -13,6 +13,9 @@
<el-option v-for="creditCard in bankCardLendList" :key="creditCard.id" :label="creditCard.nameCode" :value="creditCard.id" />
</el-select>
</el-form-item>
<el-form-item label="刷卡时间" prop="time">
<el-date-picker v-model="queryParams.time" type="daterange" range-separator="至" start-placeholder="开始时间" end-placeholder="结束时间" />
</el-form-item>
</el-form>
<div class="search-btn-con">
<el-button type="primary" icon="Search" @click="handleQuery">搜索</el-button>
@@ -38,8 +41,8 @@
<!-- <el-table-column type="selection" width="55" align="center" /> -->
<el-table-column label="POS机名称" align="center" prop="posName" />
<el-table-column label="刷卡商户" align="center" prop="merchantName" />
<el-table-column label="刷卡时间" align="center" prop="createTime" />
<el-table-column label="信用卡" align="center" prop="outAccountName" />
<el-table-column label="刷卡时间" align="center" prop="createTime" />
<el-table-column label="交易金额" align="center" prop="amount" />
<el-table-column label="手续费" width="100" align="center" prop="commission" />
<el-table-column label="储蓄卡" align="center" prop="inAccountName" />
@@ -100,6 +103,7 @@ import {
} from '@/api/invest/accountsTransferRecord'
import { listPosmachine } from '@/api/invest/posmachine'
import { listAccounts } from '@/api/invest/accounts'
import dayjs from 'dayjs'
// eslint-disable-next-line no-unused-vars
import { require } from '@/utils/require'
const { proxy } = getCurrentInstance()
@@ -129,6 +133,7 @@ const data = reactive({
pageSize: 10,
name: null,
type: '1',
time: '',
posId: null,
inAccountId: null,
outAccountId: null,
@@ -199,6 +204,15 @@ function getFutruesStocksList() {
/** 查询POS机刷卡列表 */
function getList() {
loading.value = true
const timeRange = queryParams.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')
}
queryParams.value.startTime = st
queryParams.value.endTime = et
listAccountsTransferRecord(queryParams.value).then((response) => {
accountsTransferRecordList.value = response.rows
total.value = response.total