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="futruesStocks in futruesStocksList" :key="futruesStocks.id" :label="futruesStocks.nameDebitNameCode" :value="futruesStocks.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>
@@ -97,7 +100,7 @@ import {
} from '@/api/invest/accountsTransferRecord'
import { listAccounts } from '@/api/invest/accounts'
import { listFutureStocks } from '@/api/invest/futureStocks'
import dayjs from 'dayjs'
// eslint-disable-next-line no-unused-vars
import { require } from '@/utils/require'
const { proxy } = getCurrentInstance()
@@ -127,6 +130,7 @@ const data = reactive({
pageSize: 10,
name: null,
type: '3',
time: '',
posId: null,
inAccountId: null,
outAccountId: null,
@@ -202,6 +206,15 @@ function getFutruesStocksList() {
/** 查询投资账户记账列表 */
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