|
|
@@ -0,0 +1,101 @@
|
|
|
+<template>
|
|
|
+ <div>
|
|
|
+ <block 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>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ <!-- <kd-entrance></kd-entrance> -->
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import { changeList } from '@/api/shop-ye-change'
|
|
|
+import list from '@/mixins/list'
|
|
|
+export default {
|
|
|
+ name: "cashList",//余额变动记录
|
|
|
+ components: {
|
|
|
+ AppWrapperEmpty
|
|
|
+ },
|
|
|
+ mixins:[list],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ columns: [
|
|
|
+ {
|
|
|
+ name: "事项",
|
|
|
+ dataIndex: "event",
|
|
|
+ color: "info",
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "金额",
|
|
|
+ dataIndex: "amount",
|
|
|
+ color: "info",
|
|
|
+ align: "center"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "余额",
|
|
|
+ dataIndex: "txBalance",
|
|
|
+ color: "info",
|
|
|
+ align: "center"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ };
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init(){
|
|
|
+ uni.showLoading({
|
|
|
+ title: '加载中'
|
|
|
+ });
|
|
|
+ try {
|
|
|
+ const res = await changeList({
|
|
|
+ page:this.list.page,tx:2
|
|
|
+ })
|
|
|
+ res.data.list = res.data.list.map(i=>({
|
|
|
+ ...i,
|
|
|
+ statusText: i.status ==1?'待处理':i.status ==2?'已完成':'未通过'
|
|
|
+ }))
|
|
|
+ this.completes(res)
|
|
|
+ } finally {
|
|
|
+ uni.hideLoading();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ },
|
|
|
+ async onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ await this.init()
|
|
|
+ uni.stopPullDownRefresh();;
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+};
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped></style>
|