ConfirmBooks.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  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. console.log(row, "row-----");
  31. this.showPopup = true;
  32. if(row.isbn){
  33. this.bookInfo = row;
  34. }
  35. },
  36. closePopup() {
  37. this.showPopup = false;
  38. },
  39. confirmComplete() {
  40. // 处理确认书册齐全的逻辑
  41. this.$emit('confirm');
  42. this.closePopup();
  43. },
  44. markIncomplete() {
  45. // 处理书册不全的逻辑
  46. this.$emit('incomplete');
  47. this.closePopup();
  48. }
  49. }
  50. };
  51. </script>
  52. <style lang="scss" scoped>
  53. .popup-content-confirm {
  54. background: #FFFFFF;
  55. padding: 40rpx;
  56. width: 600rpx;
  57. .popup-title {
  58. font-size: 32rpx;
  59. color: #333333;
  60. font-weight: 500;
  61. text-align: center;
  62. }
  63. .desc-text {
  64. font-size: 26rpx;
  65. color: #999999;
  66. text-align: center;
  67. margin-top: 20rpx;
  68. margin-bottom: 30rpx;
  69. }
  70. .book-info {
  71. display: flex;
  72. background: #F8F8F8;
  73. padding: 20rpx;
  74. border-radius: 10rpx;
  75. margin-bottom: 30rpx;
  76. .book-cover {
  77. width: 120rpx;
  78. height: 160rpx;
  79. border-radius: 6rpx;
  80. }
  81. .book-detail {
  82. flex: 1;
  83. margin-left: 20rpx;
  84. .book-name {
  85. font-size: 28rpx;
  86. color: #333333;
  87. line-height: 1.4;
  88. margin-bottom: 10rpx;
  89. display: -webkit-box;
  90. -webkit-box-orient: vertical;
  91. -webkit-line-clamp: 2;
  92. overflow: hidden;
  93. }
  94. .book-isbn {
  95. font-size: 26rpx;
  96. color: #999999;
  97. }
  98. }
  99. }
  100. .buttons {
  101. display: flex;
  102. flex-direction: column;
  103. gap: 20rpx;
  104. button {
  105. width: 100%;
  106. height: 88rpx;
  107. line-height: 88rpx;
  108. border-radius: 10rpx;
  109. font-size: 32rpx;
  110. border: none;
  111. &.confirm-btn {
  112. background-color: #38C148;
  113. color: #FFFFFF;
  114. }
  115. &.incomplete-btn {
  116. background-color: #F1F1F1;
  117. color: #FF5B5B;
  118. margin: 0;
  119. }
  120. }
  121. }
  122. }
  123. </style>