|
@@ -0,0 +1,121 @@
|
|
|
+<template>
|
|
|
+ <van-nav-bar
|
|
|
+ :title="$t('claim.name')"
|
|
|
+ left-text=""
|
|
|
+ left-arrow
|
|
|
+ @click-left="onClickLeft"
|
|
|
+ @click-right="onClickRight"
|
|
|
+ >
|
|
|
+ <template #right>{{ $t("common.add") }}</template>
|
|
|
+ </van-nav-bar>
|
|
|
+ <van-search
|
|
|
+ v-model="req.keyword"
|
|
|
+ :placeholder="$t('common.pleaseEnterKeywords')"
|
|
|
+ @search="onRefresh"
|
|
|
+ />
|
|
|
+ <van-pull-refresh v-model="loading" @refresh="onRefresh">
|
|
|
+ <div class="list">
|
|
|
+ <van-list
|
|
|
+ v-model:loading="loading"
|
|
|
+ :finished="finished"
|
|
|
+ :finished-text="$t('common.noMore')"
|
|
|
+ @load="getList"
|
|
|
+ style="margin-bottom: 60px"
|
|
|
+ >
|
|
|
+ <commonList
|
|
|
+ :data="listData"
|
|
|
+ @onClick="toDtl"
|
|
|
+ :config="listConfig"
|
|
|
+ ></commonList>
|
|
|
+ </van-list>
|
|
|
+ </div>
|
|
|
+ </van-pull-refresh>
|
|
|
+</template>
|
|
|
+<script setup>
|
|
|
+import { ref, getCurrentInstance } from "vue";
|
|
|
+import commonList from "@/components/common-list.vue";
|
|
|
+
|
|
|
+const proxy = getCurrentInstance().proxy;
|
|
|
+const onClickLeft = () => proxy.$router.push("/main/working");
|
|
|
+const onClickRight = () => {
|
|
|
+ proxy.$router.push({
|
|
|
+ path: "/main/processDtl",
|
|
|
+ query: {
|
|
|
+ flowKey: "account_request_funds_flow",
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
+const req = ref({
|
|
|
+ pageNum: 1,
|
|
|
+ keyword: null,
|
|
|
+});
|
|
|
+const finished = ref(false);
|
|
|
+const onRefresh = () => {
|
|
|
+ req.value.pageNum = 1;
|
|
|
+ finished.value = false;
|
|
|
+ getList("refresh");
|
|
|
+};
|
|
|
+const loading = ref(false);
|
|
|
+const listData = ref([]);
|
|
|
+const getList = (type) => {
|
|
|
+ loading.value = true;
|
|
|
+ proxy
|
|
|
+ .post("/accountRunningWater/page", req.value)
|
|
|
+ .then((res) => {
|
|
|
+ if (res.data.rows && res.data.rows.length > 0) {
|
|
|
+ res.data.rows = res.data.rows.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ isClaimText: item.isClaim == 1 ? "是" : "否",
|
|
|
+ };
|
|
|
+ });
|
|
|
+ }
|
|
|
+ listData.value =
|
|
|
+ type === "refresh"
|
|
|
+ ? res.data.rows
|
|
|
+ : listData.value.concat(res.data.rows);
|
|
|
+ if (req.value.pageNum * 10 >= res.data.total) {
|
|
|
+ finished.value = true;
|
|
|
+ }
|
|
|
+ req.value.pageNum++;
|
|
|
+ loading.value = false;
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ loading.value = false;
|
|
|
+ });
|
|
|
+};
|
|
|
+const toDtl = (row) => {
|
|
|
+ // proxy.$router.push({
|
|
|
+ // path: "/main/processDtl",
|
|
|
+ // query: {
|
|
|
+ // flowKey: "account_request_funds_flow",
|
|
|
+ // id: row.flowInfoId,
|
|
|
+ // processType: 20,
|
|
|
+ // },
|
|
|
+ // });
|
|
|
+};
|
|
|
+const listConfig = ref([
|
|
|
+ {
|
|
|
+ label: proxy.t("claim.createTime"),
|
|
|
+ prop: "createTime",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: proxy.t("claim.currencyTotal"),
|
|
|
+ prop: "currencyTotal",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: proxy.t("claim.paymentRemarks"),
|
|
|
+ prop: "paymentRemarks",
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: proxy.t("claim.fundsText"),
|
|
|
+ prop: "fundsText",
|
|
|
+ },
|
|
|
+]);
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.list {
|
|
|
+ min-height: 70vh;
|
|
|
+}
|
|
|
+</style>
|