<template>
    <div class="container">
        <van-cell-group class="shujuList" style="height: calc(100vh - 40px); overflow-y: auto;">
            <van-cell title="快递单号" :value="list.expressNo" />
            <van-cell title="快递公司" :value="list.expressCompany" />
            <van-cell title="收件人姓名" :value="list.recipient" />
            <van-cell title="收件人手机号码" :value="list.phone" />
            <van-cell title="收件人部门" :value="list.departmentId" />
            <van-cell title="所属收发室" :value="list.mailRoom" />
            <van-cell title="收件人楼层" :value="list.shelfInformation" />
            <!-- <van-cell title="收件人姓名" value="内容" /> -->
            <van-cell title="收件人座位" :value="list.sendSeat" />
            <van-cell title="快件类型" :value="list.expressType" />
            <van-cell title="快件数量" :value="list.expressQuantity" />
            <van-cell title="快件状态"
                :value="list.expressStatus == 0 ? '已入库' : `${list.expressStatus == 1 ? '派送中' : `${list.expressStatus == 2 ? '已签收' : '滞留件'}`}`" />
            <van-cell title="货架信息" :value="list.shelfInformation" />
            <van-cell title="是否到付" :value="list.isPayOnDelivery" />
            <van-cell title="到付费用" :value="list.payMoney" />
            <van-cell title="快递备注" :value="list.remark" />
        </van-cell-group>

        <van-button class="backHomePage" type="primary" size="large" @click="backHome">返回首页</van-button>
    </div>
</template>

<script>
export default {
    name: 'scannerResult',
    props: ['shipment'],
    data() {
        return {
            list: {}
        };
    },
    created() {
        this.list = this.$store.state.shipment.data || {}
        console.log('this.list', this.list)
    },
    methods: {
        backHome() {
            this.$router.push('/')
        }
    },
};
</script>

<style lang="less" scoped>
.container {
    height: 100vh;

    .shujuList {
        height: 100vh;
    }

    .backHomePage {
        position: fixed;
        height: 40px;
        width: 100vw;
        bottom: 0;
        left: 0;
        border-radius: 5px;
        padding: 0 20px;
    }
}
</style>
