|
|
@@ -4,6 +4,11 @@
|
|
|
<template #header>
|
|
|
<app-navbar title="历史资金流水" @back="closed">
|
|
|
<template #footer>
|
|
|
+ <Field name="operateType" label="资金类型" is-link input-align="right">
|
|
|
+ <template #input>
|
|
|
+ <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onSelectConfirm"/>
|
|
|
+ </template>
|
|
|
+ </Field>
|
|
|
<Cell title="查询日期" :value="dateRange.join('-')" @click="showCalendar = true" is-link />
|
|
|
</template>
|
|
|
</app-navbar>
|
|
|
@@ -31,7 +36,9 @@ import AppModal from '@/components/base/modal/index.vue'
|
|
|
import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
|
|
|
import AppList from '@mobile/components/base/list/index.vue'
|
|
|
import moment from 'moment'
|
|
|
-import { Calendar, Cell } from 'vant'
|
|
|
+import { Calendar, Cell, Field } from 'vant'
|
|
|
+import { getOperateTypeList } from '@/constants/order'
|
|
|
+import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
|
|
|
const showModal = shallowRef(true)
|
|
|
const dataList = shallowRef<Model.HisAmountLogRsp[]>([])
|
|
|
@@ -39,6 +46,8 @@ const error = shallowRef(false)
|
|
|
const showCalendar = shallowRef(false) // 是否显示日期选择器
|
|
|
const dateRange = ref<string[]>([]) // 日期范围
|
|
|
const pullRefreshRef = shallowRef()
|
|
|
+/// 资金类型
|
|
|
+const operatetype = shallowRef(101)
|
|
|
|
|
|
const columns: Model.TableColumn[] = [
|
|
|
{ prop: 'createtime', label: '时间' },
|
|
|
@@ -48,11 +57,11 @@ const columns: Model.TableColumn[] = [
|
|
|
|
|
|
const { loading, pageIndex, pageCount, run } = useRequest(queryHisAmountLog, {
|
|
|
manual: true,
|
|
|
+ params: {
|
|
|
+ operateType: operatetype.value.toString()
|
|
|
+ },
|
|
|
onSuccess: (res) => {
|
|
|
- if (pageIndex.value === 1) {
|
|
|
- dataList.value = []
|
|
|
- }
|
|
|
- dataList.value.push(...res.data)
|
|
|
+ dataList.value = res.data
|
|
|
},
|
|
|
onError: () => {
|
|
|
error.value = true
|
|
|
@@ -67,6 +76,15 @@ const onConfirm = ([start, end]: Date[]) => {
|
|
|
pullRefreshRef.value?.refresh()
|
|
|
}
|
|
|
|
|
|
+// 选中资金类型
|
|
|
+const onSelectConfirm = (value: number) => {
|
|
|
+ operatetype.value = value
|
|
|
+ run({
|
|
|
+ page: 1,
|
|
|
+ operateType: value.toString()
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
const onRefresh = () => {
|
|
|
const [begindate, enddate] = dateRange.value
|
|
|
run({
|