detail-book-item.vue 7.3 KB

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