detail-book-item.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="book-item">
  3. <view class="book-info">
  4. <image class="book-cover" :src="book.cover" mode="aspectFill" />
  5. <view class="book-detail">
  6. <view class="top-info">
  7. <view class="book-title">{{ book.bookName }}</view>
  8. <view class="book-tags">
  9. <text class="tzs tag-text" v-if="book.suit == 1">套装书</text>
  10. <text class="kmdb tag-text" v-if="book.maxNum > 1">可卖多本</text>
  11. </view>
  12. <view class="flex flex-j-b flex-a-c mt-20">
  13. <view class="book-price">预估价: ¥{{ book.recycleMoney }}</view>
  14. </view>
  15. </view>
  16. <view class="book-price mb-16 mt-20" v-if="book.auditList && book.auditList.length">审核信息</view>
  17. <template v-if="book.auditList && book.auditList.length">
  18. <view class="audit-info">
  19. <view class="audit-item" v-for="(audit, index) in book.auditList" :key="index">
  20. <view class="flex-a w100">
  21. <view class="flex-a flex-1">
  22. <view class="common-text-2 mr-16">第{{ index + 1 }}本</view>
  23. <view class="audit-status"
  24. :class="audit.status === '良好' ? 'status-good' : 'status-bad'">
  25. {{ audit.status }}
  26. </view>
  27. </view>
  28. <view class="audit-price flex-1"><text class="common-text-2">审核:</text> ¥{{ audit.price }}
  29. </view>
  30. </view>
  31. <view class="audit-reason" v-if="audit.auditReason">
  32. 原因:{{ audit.auditReason }}
  33. </view>
  34. </view>
  35. </view>
  36. </template>
  37. <view v-else class="book-price mt-20">暂无审核信息</view>
  38. </view>
  39. <view class="delete-btn">
  40. <text>×{{ book.num }}</text>
  41. </view>
  42. </view>
  43. <common-dialog ref="deleteDialog" title="温馨提示" @confirm="confirmDelete">
  44. <text>确定删除这本图书吗?</text>
  45. </common-dialog>
  46. </view>
  47. </template>
  48. <script>
  49. import commonDialog from '@/components/common-dialog.vue';
  50. export default {
  51. components: {
  52. commonDialog
  53. },
  54. props: {
  55. book: {
  56. type: Object,
  57. required: true
  58. }
  59. },
  60. data() {
  61. return {}
  62. },
  63. methods: {
  64. }
  65. }
  66. </script>
  67. <style lang="scss" scoped>
  68. .book-item {
  69. background: #FFFFFF;
  70. margin-bottom: 30rpx;
  71. border-radius: 10rpx;
  72. .tag-text {
  73. font-family: Source Han Sans CN;
  74. font-weight: 400;
  75. font-size: 24rpx;
  76. color: #FFFFFF;
  77. }
  78. .tzs {
  79. width: 91rpx;
  80. height: 30rpx;
  81. background: linear-gradient(263deg, #98E05F, #0DE3AC);
  82. border-radius: 2rpx;
  83. padding: 4rpx 10rpx;
  84. margin-right: 10rpx;
  85. }
  86. .kmdb {
  87. width: 117rpx;
  88. height: 30rpx;
  89. background: linear-gradient(263deg, #F7CB6B, #FBA980);
  90. border-radius: 2rpx;
  91. padding: 4rpx 10rpx;
  92. margin-right: 10rpx;
  93. }
  94. .book-info {
  95. display: flex;
  96. position: relative;
  97. .book-cover {
  98. width: 140rpx;
  99. height: 196rpx;
  100. border-radius: 8rpx;
  101. }
  102. .book-detail {
  103. flex: 1;
  104. margin-left: 20rpx;
  105. display: flex;
  106. flex-direction: column;
  107. justify-content: space-between;
  108. :v-deep .u-number-input {
  109. background: #F9F9F9 !important;
  110. border-radius: 6rpx;
  111. }
  112. .book-title {
  113. max-width: 400rpx;
  114. font-size: 28rpx;
  115. color: #333;
  116. line-height: 1.4;
  117. margin-bottom: 20rpx;
  118. display: -webkit-box;
  119. -webkit-box-orient: vertical;
  120. -webkit-line-clamp: 2;
  121. overflow: hidden;
  122. font-family: Source Han Sans CN;
  123. font-weight: 400;
  124. }
  125. .book-price {
  126. font-family: Source Han Sans CN;
  127. font-weight: 400;
  128. font-size: 24rpx;
  129. color: #999999;
  130. }
  131. }
  132. .delete-btn {
  133. position: absolute;
  134. right: 0;
  135. top: -10rpx;
  136. padding: 10rpx;
  137. }
  138. }
  139. .audit-info {
  140. min-height: 60rpx;
  141. background: #FAFAFA;
  142. border-radius: 10rpx;
  143. padding: 16rpx 22rpx;
  144. box-sizing: border-box;
  145. .audit-item {
  146. margin-bottom: 6rpx;
  147. font-size: 24rpx;
  148. line-height: 42rpx;
  149. }
  150. .audit-status {
  151. margin-right: 20rpx;
  152. &.status-good {
  153. color: #67C23A;
  154. }
  155. &.status-bad {
  156. color: #F56C6C;
  157. }
  158. }
  159. .audit-price {
  160. color: #F56C6C;
  161. }
  162. .audit-reason {
  163. font-size: 26rpx;
  164. color: #999;
  165. font-weight: 400;
  166. font-family: PingFang SC;
  167. margin-top: 6rpx;
  168. }
  169. }
  170. }
  171. </style>