<template>
    <root-portal>
        <up-popup :show="show" closeable round="0" @close="close">
            <view>
                <view class="pd-24">
                    <view class="f-s-34 f-w-5 c-#333">查看批次信息</view>
                    <view class="f-s-24 c-#999">若下列溯源信息有误，请前往相应位置修改。</view>
                </view>
                <scroll-view scroll-y style="max-height: 70vh;">
                    <view class="pd3-0-24-24">
                        <batch-info v-if="info" :info="info"></batch-info>
                    </view>
                </scroll-view>
            </view>
        </up-popup>
    </root-portal>
</template>
<script lang="ts" setup>
import { useClientRequest } from '@/utils/request';
 import batchInfo from './batch-info.vue';
const props = defineProps({
    show: {
        type: Boolean,
        default: false,
    },
    packId: {
        type: String,
        default: '',
    },
    title: {
        type: String,
        default: '系统提示',
    },
    showTitle: {
        type: Boolean,
        default: true,
    },
    tabs: {
        type: Array,
        default: () => [],
    },
    mode: {
        type: String,
    }
})
const emit = defineEmits<{
    // 关闭事件
    (e: 'close'): void;
    // 更新 show 状态
    (e: 'update:show', value: boolean): void;
}>();
const close = () => {
    emit('update:show', false);
    emit('close');
};
const info = ref<any>(null);
// 获取批次信息接口
const getBatchInfo = async () => {
    const res = await useClientRequest.get(`/plt-api/app/packTask/getPackTraceSimpleInfo/${props?.packId}`);
    console.log(res);
    info.value = res?.data;
}
onMounted(() => {
    getBatchInfo()
})
</script>