|
@@ -1,6 +1,6 @@
|
|
<template>
|
|
<template>
|
|
<div id="policy">
|
|
<div id="policy">
|
|
- <supermarkettable-detail :info="info"></supermarkettable-detail>
|
|
|
|
|
|
+ <supermarkettable-detail :tableData="tableData" :total="total" :info="info" @query="query"></supermarkettable-detail>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -9,6 +9,7 @@ import supermarkettableDetail from '@/components/supermaket/supermarkettableDeta
|
|
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
import { createNamespacedHelpers, mapGetters, mapState } from 'vuex';
|
|
import _ from 'loadsh';
|
|
import _ from 'loadsh';
|
|
const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
|
+const { mapActions: transaction } = createNamespacedHelpers('transaction');
|
|
export default {
|
|
export default {
|
|
name: 'policy',
|
|
name: 'policy',
|
|
props: {},
|
|
props: {},
|
|
@@ -23,9 +24,12 @@ export default {
|
|
contentList: [],
|
|
contentList: [],
|
|
total: 1,
|
|
total: 1,
|
|
skip: '',
|
|
skip: '',
|
|
|
|
+ limit: 10,
|
|
|
|
+ tableData: [],
|
|
}),
|
|
}),
|
|
async created() {
|
|
async created() {
|
|
this.searchSite();
|
|
this.searchSite();
|
|
|
|
+ this.jiaoyilist();
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
totaltype() {
|
|
totaltype() {
|
|
@@ -34,6 +38,7 @@ export default {
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
...mapSite(['showInfo']),
|
|
...mapSite(['showInfo']),
|
|
|
|
+ ...transaction({ transactionQuery: 'query', ProductFetch: 'fetch', ProductDelete: 'delete' }),
|
|
|
|
|
|
// 查询站点信息
|
|
// 查询站点信息
|
|
async searchSite() {
|
|
async searchSite() {
|
|
@@ -45,6 +50,16 @@ export default {
|
|
this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
this.$message.error(res.errmsg ? res.errmsg : 'error');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ async jiaoyilist({ skip = 0, limit = 10 } = {}) {
|
|
|
|
+ const res = await this.transactionQuery({ skip, limit });
|
|
|
|
+ this.$set(this, `tableData`, res.data);
|
|
|
|
+ this.$set(this, `total`, res.total);
|
|
|
|
+ },
|
|
|
|
+ async query(val) {
|
|
|
|
+ console.log(val);
|
|
|
|
+
|
|
|
|
+ this.jiaoyilist({ skip: (val - 1) * this.limit, limit: this.limit });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|