detail-book-item.vue 6.7 KB

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