|
|
@@ -0,0 +1,73 @@
|
|
|
+<template>
|
|
|
+ <view class="app-content">
|
|
|
+ <div class="list-by_box" v-if="!$util.isEmpty(list.data)">
|
|
|
+ <t-table :headerBackgroundColor="'#F0F2F6'">
|
|
|
+ <t-tr header>
|
|
|
+ <t-th v-for="(item, index) in columns" :key="index" :align="item.align">
|
|
|
+ {{ item.name }}
|
|
|
+ </t-th>
|
|
|
+ </t-tr>
|
|
|
+ <t-tr v-for="(item, index) in list.data" :key="index">
|
|
|
+ <t-td v-for="(column, colIndex) in columns" :key="colIndex" :align="column.align" :color="column.color" >
|
|
|
+ <view>
|
|
|
+ {{ item[column.dataIndex] || "" }}
|
|
|
+ </view>
|
|
|
+ </t-td>
|
|
|
+ </t-tr>
|
|
|
+ </t-table>
|
|
|
+ </div>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ </view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import { list } from "@/mixins";
|
|
|
+import { capitaList } from '@/api/store'
|
|
|
+export default {
|
|
|
+ name: "expend",
|
|
|
+ components: {
|
|
|
+ AppWrapperEmpty
|
|
|
+ },
|
|
|
+ mixins: [list],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {name: "事项",dataIndex: "event",color: "info",align: "center"},
|
|
|
+ {name: "金额",dataIndex: "amount",color: "info",align: "center"},
|
|
|
+ {name: "累计支出",dataIndex: "totalExpend",color: "info",align: "center"},
|
|
|
+ {name: "时间",dataIndex: "addTime",color: "info",align: "center"}
|
|
|
+ ],
|
|
|
+ tabIndex: 0
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ getList(){
|
|
|
+ return capitaList({ page: this.list.page, io: 0 }).then(res=>{
|
|
|
+ this.completes(res);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ this.getList().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this.getList().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+</style>
|