ShipmentPickReviewModal.vue 1.41 KB
<template>
  <div v-if="visible" class="modal-overlay">
    <div class="modal-content">
      <h3>审核确认</h3>
      <p>请确认是否通过审核:</p>
      <div class="button-group">
        <a-button type="primary" @click="approve">审核通过</a-button>
        <a-button type="danger" @click="reject">审核不通过</a-button>
      </div>
      <a-button class="close-btn" @click="close">关闭</a-button>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    visible: {
      type: Boolean,
      default: false,
    },
  },
  watch: {
    visible(val) {
      console.log('Modal visibility changed:', val);
    },
  },
  methods: {
    approve() {
      console.log('审核通过按钮被点击');
      this.$emit('approve');
      this.close();
    },
    reject() {
      console.log('审核不通过按钮被点击');
      this.$emit('reject');
      this.close();
    },
    close() {
      console.log('关闭按钮被点击');
      this.$emit('close');
    },
  },
};
</script>

<style scoped>
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: white;
  padding: 20px;
  border-radius: 5px;
  text-align: center;
}

.button-group {
  margin: 20px 0;
}

a-button {
  margin: 0 10px;
}

.close-btn {
  margin-top: 20px;
}
</style>