detail-book-item.vue 7.8 KB

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