<template>
  <u-popup v-model="show" mode="center">
    <com-popup @onClose="closePopup">
      <view v-for="(item, index) in receiptList" :key="index">
        <com-issue-job-card :dataContent="item" @click="selectItem(item)"></com-issue-job-card>
        <view class="split_line"></view>
      </view>
    </com-popup>
  </u-popup>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import comPopup from '@/mycomponents/common/comPopup.vue'
import comIssueJobCard from '@/pages/issue/coms/comIssueJobCard.vue'

const receiptList = ref([])
const show = ref(false)
const openPopup = (items) => {
  receiptList.value = items
  show.value = true
}
const closePopup = () => {
  show.value = false
}
const selectItem = (item) => {
  emit('selectedItem', item)
  show.value = false
}
// 传递给父类
const emit = defineEmits(['selectedItem'])
defineExpose({
  openPopup,
  closePopup
})
</script>

<style></style>
