<template>
    <div style="width: 100vw;">
        <van-tabs v-model="active" @click="onClick">
            <van-tab title="待派件">
                <waitsent></waitsent>
            </van-tab>
            <van-tab title="已派件">
                <sented></sented>
            </van-tab>
        </van-tabs>
    </div>
</template>

<script>
import Sented from '../components/Sented.vue'
import Waitsent from '../components/Waitsent.vue'
import { appOutboundInquiry } from '@/api/index'
export default {
    name: 'DeliveryInquiry',
    components: {
        Sented,
        Waitsent
    },
    data() {
        return {
            titlename: '派件查询',
            active: 0,
        }
    },
    methods: {
        async onClick(name, title) {
            console.log(name, title)
            let parmas = {
                dispatchBatchNo: '', // 批次号
                deliveryPeopleId: localStorage.getItem('courierId'), //派送员id
                isFinish: name == 0 ? '2' : '1',//完成 1已完成 2未完成
                page: '1',
                limit: name == 0 ? '6' : '10',

            }
            const res = await appOutboundInquiry({ ...parmas }, { emulateJSON: true, loading: true, message: "查询中..." })
            console.log(res, 'res')
        }
    },
}
</script>

<style scoped lang="less"></style>
