ConfirmBooks.vue 3.3 KB

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