detail-book-item.vue 6.5 KB

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