clearing-print-stock.vue 1.29 KB
<template>
    <layout-print>
        <h2>对账单库存</h2>
        <Table border :columns="tableCols" :data="tableData"></Table>
    </layout-print>
</template>

<script>
    import _ from 'lodash';
    import stock from '../clearing/store/stock';
    import FinanceService from 'services/finance/finance-service';


    export default {
        data() {
            return stock.call(this);
        },
        created() {
            this.FinanceService = new FinanceService();
            this.search();
        },
        methods: {
            search() {
                let params = {
                    brandId: +this.$route.query.brandId,
                    beginTime: +this.$route.query.begin,
                    endTime: +this.$route.query.end,
                    pageSize: 20,
                    pageNo: this.$route.query.page
                };

                params = _.pickBy(params, val => val);

                this.FinanceService.inventoryLedgerList(params).then(ret => {
                    this.tableData = _.get(ret, 'data.records', []);
                });
            }
        }
    };
</script>

<style lang="scss" scoped>
h2 {
    line-height: 50px;
    border-bottom: 1px solid #f2f2f2;
    margin-bottom: 10px;
}
.print-detail {
    margin-bottom: 20px;
    color: #333;
}
</style>