lxf 1 jaar geleden
bovenliggende
commit
ca5f562269
3 gewijzigde bestanden met toevoegingen van 131 en 0 verwijderingen
  1. 7 0
      src/lang/cn.js
  2. 5 0
      src/router/routerLXF.js
  3. 119 0
      src/views/fund/funds/index.vue

+ 7 - 0
src/lang/cn.js

@@ -1192,5 +1192,12 @@ export const lang = {
 		expensesTime: '打款时间',
 		expensesTimeMsg: '请选择打款时间',
 		remark: '摘要',
+	},
+	funds: {
+		name: '请款',
+		createTime: '请款时间',
+		currencyTotal: '请款金额',
+		paymentRemarks: '用款说明',
+		fundsText: '放款状态',
 	}
 }

+ 5 - 0
src/router/routerLXF.js

@@ -130,6 +130,11 @@ export function routesLXF() {
       name: "打款详情",
       component: () => import("../views/fund/account-payment/detail.vue"),
     },
+    {
+      path: "funds",
+      name: "请款",
+      component: () => import("../views/fund/funds/index.vue"),
+    },
   ];
   return routesLXF;
 }

+ 119 - 0
src/views/fund/funds/index.vue

@@ -0,0 +1,119 @@
+<template>
+  <van-nav-bar :title="$t('funds.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: "flowOfFundsAdd",
+  //   query: {
+  //     type: "add",
+  //   },
+  // });
+};
+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("/accountRequestFunds/page", req.value)
+    .then((res) => {
+      if (res.data.rows && res.data.rows.length > 0) {
+        res.data.rows = res.data.rows.map((item) => {
+          let fundsText = "";
+          if (item.status == 10) {
+            fundsText = "审批中";
+          } else if (item.status == 20) {
+            fundsText = "驳回";
+          } else if (item.status == 30) {
+            fundsText = "审批通过";
+          }
+          if (item.accountPaymentStatus == "10") {
+            fundsText = fundsText + ", " + "已打款";
+          } else if (item.accountPaymentStatus == "20") {
+            fundsText = fundsText + ", " + "未打款";
+          }
+          return {
+            ...item,
+            currencyTotal: item.currency + " " + item.total,
+            fundsText: fundsText,
+          };
+        });
+      }
+      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) => {
+  // if (row.status == "10") {
+  //   proxy.$router.push({
+  //     path: "accountPaymentDetail",
+  //     query: {
+  //       id: row.id,
+  //     },
+  //   });
+  // } else if (row.status == "20") {
+  //   proxy.$router.push({
+  //     path: "accountPaymentAdd",
+  //     query: {
+  //       id: row.id,
+  //     },
+  //   });
+  // }
+};
+const listConfig = ref([
+  {
+    label: proxy.t("funds.createTime"),
+    prop: "createTime",
+  },
+  {
+    label: proxy.t("funds.currencyTotal"),
+    prop: "currencyTotal",
+  },
+  {
+    label: proxy.t("funds.paymentRemarks"),
+    prop: "paymentRemarks",
+  },
+  {
+    label: proxy.t("funds.fundsText"),
+    prop: "fundsText",
+  },
+]);
+</script>
+
+<style lang="scss" scoped>
+.list {
+  min-height: 70vh;
+}
+</style>