ConfirmBooks.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <u-popup v-model="showPopup" @close="closePopup" @open="openPopup" mode="center" border-radius="20">
  3. <view class="popup-content-confirm">
  4. <view class="popup-title">需要确认你手里的书册数齐全</view>
  5. <view class="desc-text">缺册会导致拒收,请核对册数后再提交</view>
  6. <view class="book-info">
  7. <image class="book-cover" :src="bookInfo.cover" mode="aspectFit" />
  8. <view class="book-detail">
  9. <view class="book-name">{{ bookInfo.bookName }}</view>
  10. <view class="book-isbn">ISBN:{{ bookInfo.isbn }}</view>
  11. </view>
  12. </view>
  13. <view class="buttons">
  14. <button class="confirm-btn" @click="confirmComplete">确认书册齐全</button>
  15. <button class="incomplete-btn" @click="markIncomplete">书册不全,有缺册</button>
  16. </view>
  17. </view>
  18. </u-popup>
  19. </template>
  20. <script>
  21. export default {
  22. data() {
  23. return {
  24. showPopup: false,
  25. bookInfo: {}
  26. };
  27. },
  28. methods: {
  29. openPopup(row) {
  30. this.showPopup = true;
  31. this.bookInfo = row;
  32. },
  33. closePopup() {
  34. this.showPopup = false;
  35. },
  36. confirmComplete() {
  37. // 处理确认书册齐全的逻辑
  38. this.$emit('confirm');
  39. this.closePopup();
  40. },
  41. markIncomplete() {
  42. // 处理书册不全的逻辑
  43. this.$emit('incomplete');
  44. this.closePopup();
  45. }
  46. }
  47. };
  48. </script>
  49. <style lang="scss" scoped>
  50. .popup-content-confirm {
  51. background: #FFFFFF;
  52. padding: 40rpx;
  53. width: 600rpx;
  54. .popup-title {
  55. font-size: 32rpx;
  56. color: #333333;
  57. font-weight: 500;
  58. text-align: center;
  59. }
  60. .desc-text {
  61. font-size: 26rpx;
  62. color: #999999;
  63. text-align: center;
  64. margin-top: 20rpx;
  65. margin-bottom: 30rpx;
  66. }
  67. .book-info {
  68. display: flex;
  69. background: #F8F8F8;
  70. padding: 20rpx;
  71. border-radius: 10rpx;
  72. margin-bottom: 30rpx;
  73. .book-cover {
  74. width: 120rpx;
  75. height: 160rpx;
  76. border-radius: 6rpx;
  77. }
  78. .book-detail {
  79. flex: 1;
  80. margin-left: 20rpx;
  81. .book-name {
  82. font-size: 28rpx;
  83. color: #333333;
  84. line-height: 1.4;
  85. margin-bottom: 10rpx;
  86. display: -webkit-box;
  87. -webkit-box-orient: vertical;
  88. -webkit-line-clamp: 2;
  89. overflow: hidden;
  90. }
  91. .book-isbn {
  92. font-size: 26rpx;
  93. color: #999999;
  94. }
  95. }
  96. }
  97. .buttons {
  98. display: flex;
  99. flex-direction: column;
  100. gap: 20rpx;
  101. button {
  102. width: 100%;
  103. height: 88rpx;
  104. line-height: 88rpx;
  105. border-radius: 10rpx;
  106. font-size: 32rpx;
  107. border: none;
  108. &.confirm-btn {
  109. background-color: #38C148;
  110. color: #FFFFFF;
  111. }
  112. &.incomplete-btn {
  113. background-color: #F1F1F1;
  114. color: #FF5B5B;
  115. margin: 0;
  116. }
  117. }
  118. }
  119. }
  120. </style>