cell-dispatch.vue 1.05 KB
<template>
    <div class="cell-info">
        <span class="item">销售数:{{buyNum}}</span>
        <span class="item">实际应发数:{{actualNeed}}</span>
        <span class="item">当前需发数:{{currentNeed}}</span>
        <span class="item">收货数:{{storeNum}}</span>
    </div>
</template>

<script>
    export default {
        name: 'CellDispatch',
        props: {
            storeNum: {
                type: [String, Number]
            },
            buyNum: {
                type: [String, Number]
            },
            lackNum: {
                type: [String, Number]
            }
        },
        data() {
            return {
            }
        },
        computed: {
            actualNeed() {
                return this.buyNum - this.lackNum;
            },
            currentNeed() {
                return this.actualNeed - this.lackNum;
            }
        }
    }
</script>

<style lang="scss" scoped>

    .cell-info {
        text-align: right;

        .item {
            display: block;
        }
    }

</style>