|
|
@@ -4,7 +4,7 @@
|
|
|
<CellGroup>
|
|
|
<Field name="operateType" label="资金类型" is-link>
|
|
|
<template #input>
|
|
|
- <app-select v-model="operatetype" placeholder="请选择资金类型" :options="getOperateTypeSearchList()" :optionProps="{ label: 'label', value: 'value' }" @confirm="onConfirm"/>
|
|
|
+ <app-select v-model="operatetype" placeholder="请选择资金类型" :options="operateTypeSearchList" :optionProps="{ label: 'label', value: 'value' }" @confirm="onConfirm"/>
|
|
|
</template>
|
|
|
</Field>
|
|
|
</CellGroup>
|
|
|
@@ -31,8 +31,13 @@ import AppSelect from '@mobile/components/base/select/index.vue'
|
|
|
const dataList = shallowRef<Model.AmountLogRsp[]>([])
|
|
|
const error = shallowRef(false)
|
|
|
/// 资金类型
|
|
|
-const operatetype = shallowRef(101)
|
|
|
+const operatetype = shallowRef(0)
|
|
|
const pullRefreshRef = shallowRef()
|
|
|
+/// 查询数据
|
|
|
+const operateTypeSearchList = [{
|
|
|
+ label: '全部',
|
|
|
+ value: 0
|
|
|
+ }].concat(getOperateTypeSearchList())
|
|
|
|
|
|
const columns: Model.TableColumn[] = [
|
|
|
{ prop: 'createtime', label: '时间' },
|
|
|
@@ -42,10 +47,16 @@ const columns: Model.TableColumn[] = [
|
|
|
|
|
|
const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
|
|
|
params: {
|
|
|
- operateType: operatetype.value.toString()
|
|
|
+ pagesize: 20,
|
|
|
+ pageflag: 1,
|
|
|
+ operateType: operatetype.value === 0 ? undefined : operatetype.value.toString()
|
|
|
},
|
|
|
onSuccess: (res) => {
|
|
|
- dataList.value = res.data
|
|
|
+ if (pageIndex.value === 1) {
|
|
|
+ dataList.value = res.data
|
|
|
+ return
|
|
|
+ }
|
|
|
+ dataList.value.push(...res.data)
|
|
|
},
|
|
|
onError: () => {
|
|
|
error.value = true
|
|
|
@@ -55,9 +66,11 @@ const { loading, pageIndex, pageCount, run } = useRequest(queryAmountLog, {
|
|
|
// 选中资金类型
|
|
|
const onConfirm = (value: number) => {
|
|
|
operatetype.value = value
|
|
|
+ pageIndex.value = 1
|
|
|
run({
|
|
|
- page: 1,
|
|
|
- operateType: value.toString()
|
|
|
+ pagesize: 20,
|
|
|
+ pageflag: 1,
|
|
|
+ operateType: value === 0 ? undefined : value.toString()
|
|
|
})
|
|
|
}
|
|
|
</script>
|