| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- <template>
- <basic-container>
- <avue-crud
- :key="key"
- ref="crud"
- :option="option"
- :data="data"
- :search.sync="search"
- @on-load="onLoad"
- @search-reset="query={}"
- :page.sync="page" >
- </avue-crud>
- </basic-container>
- </template>
- <script>
- import {statisticsSaleDetail} from "@/api/saleDetail";
- export default {
- data(){
- return {
- key: 0,
- search: {},
- data: [],
- total: [],
- query: {},
- page: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- pageSizes: [10, 50, 100, 200, 300]
- },
- option: {},
- }
- },
- methods:{
- // 获取列表数据
- onLoad(page, params = {}) {
- let queryParams = {
- size: page.pageSize,
- current: page.currentPage,
- ...Object.assign(params, this.search)
- }
- statisticsSaleDetail(queryParams).then(res => {
- this.data = res.data.data.records
- this.page.total = res.data.data.total
- this.option.height = window.innerHeight - 230;
- // generalLedgerTotal(queryParams).then(res=>{
- // this.total = res.data.data
- // })
- })
- },
- }
- }
- </script>
- <style scoped>
- </style>
|