detailCard.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276
  1. <template>
  2. <view class="card" @click="$emit('toDetail', itemInfo)">
  3. <view class="user-name">
  4. <view class="name">
  5. <image class="header-img" :src="itemInfo.member.avatar" mode=""></image>
  6. <text>{{ itemInfo.member.nickname }}</text>
  7. </view>
  8. <text
  9. class="order-status"
  10. :style="
  11. this.itemInfo.status == '0' || this.itemInfo.status == '1'
  12. ? 'color:#444'
  13. : ''
  14. "
  15. >{{ deliveryStatus }}</text
  16. >
  17. </view>
  18. <view class="order-detail">
  19. <view class="detail">
  20. <image
  21. class="order-img"
  22. :src="itemInfo.goods.sku_item[0].image"
  23. mode=""
  24. ></image>
  25. <view class="detail-right">
  26. <view class="title-price">
  27. <view class="title"> {{ itemInfo.goods.name_cn }}</view>
  28. <view class="price">
  29. <text style="font-size: 20rpx">¥</text>
  30. <text>{{ itemInfo.goods.sku_item[0].price.split(".")[0] }}</text
  31. >.
  32. <text style="font-size: 20rpx">{{
  33. itemInfo.goods.sku_item[0].price.split(".")[1]
  34. }}</text>
  35. </view>
  36. </view>
  37. <view class="specifications">
  38. <view class="title"> {{ itemInfo.goods.sku_item[0].item }} </view>
  39. <text>x1</text>
  40. </view>
  41. </view>
  42. </view>
  43. <view class="price-detail">
  44. <text style="color: #222; font-size: 24rpx">{{
  45. "共1件商品" + "&nbsp;"
  46. }}</text>
  47. <text style="font-size: 28rpx">买家实付</text>
  48. <view class="price">
  49. <text style="font-size: 20rpx">¥</text>
  50. <text>{{ itemInfo.order_goods.amount.split(".")[0] }}</text
  51. >.
  52. <text style="font-size: 20rpx">{{
  53. itemInfo.order_goods.amount.split(".")[1]
  54. }}</text>
  55. </view>
  56. </view>
  57. </view>
  58. <view class="btn-list">
  59. <button
  60. disabled
  61. class="btn-2"
  62. :disabled="itemInfo.status == 3"
  63. :style="itemInfo.status == 3 ? 'opacity: 0.5' : ''"
  64. v-if="itemInfo.status == 0 || itemInfo.status == 3"
  65. @click.stop="$emit('platformIntervene', itemInfo)"
  66. >
  67. 平台介入
  68. </button>
  69. <button
  70. class="btn-1"
  71. v-if="
  72. (itemInfo.status == 0 || itemInfo.status == 3) &&
  73. Number(itemInfo.is_send)
  74. "
  75. @click.stop="$emit('refuseRefund', itemInfo)"
  76. >
  77. 拒绝申请
  78. </button>
  79. <button
  80. class="btn-3"
  81. v-if="
  82. (itemInfo.status == 0 || itemInfo.status == 3) &&
  83. Number(itemInfo.is_send)
  84. "
  85. @click.stop="$emit('agreeRefund', itemInfo)"
  86. >
  87. 同意退款
  88. </button>
  89. <button
  90. class="btn-2"
  91. v-if="itemInfo.status == 1"
  92. @click.stop="$emit('openPop', itemInfo)"
  93. >
  94. 删除
  95. </button>
  96. <button class="btn-2" v-if="itemInfo.status == 1">查看详情</button>
  97. </view>
  98. </view>
  99. </template>
  100. <script>
  101. export default {
  102. props: {
  103. itemInfo: {
  104. typeof: Object,
  105. default: {},
  106. },
  107. },
  108. computed: {
  109. model() {
  110. if (this.itemInfo.status == 0) {
  111. return "filter: blur(5px);";
  112. }
  113. },
  114. deliveryStatus() {
  115. if (this.itemInfo.status == "0") {
  116. return "待退款";
  117. } else if (this.itemInfo.status == "3") {
  118. return "平台介入";
  119. } else if (this.itemInfo.status == "2") {
  120. return "拒绝退款";
  121. } else if (this.itemInfo.status == "1") {
  122. return "已退款";
  123. }
  124. },
  125. },
  126. data() {
  127. return {};
  128. },
  129. };
  130. </script>
  131. <style scoped lang="scss">
  132. .card {
  133. background-color: #fff;
  134. border-radius: 16rpx;
  135. padding: 0 20rpx;
  136. padding-bottom: 20rpx;
  137. margin-bottom: 20rpx;
  138. .user-name {
  139. display: flex;
  140. justify-content: space-between;
  141. align-items: center;
  142. height: 84rpx;
  143. border-bottom: 2rpx solid rgba(151, 151, 151, 0.2);
  144. .name {
  145. display: flex;
  146. align-items: center;
  147. font-size: 24rpx;
  148. color: #333;
  149. .header-img {
  150. width: 40rpx;
  151. height: 40rpx;
  152. border-radius: 50%;
  153. margin-right: 12rpx;
  154. }
  155. }
  156. .order-status {
  157. font-size: 24rpx;
  158. color: #f83224;
  159. }
  160. }
  161. .order-detail {
  162. margin-top: 22rpx;
  163. position: relative;
  164. .detail {
  165. display: flex;
  166. .order-img {
  167. width: 180rpx;
  168. height: 180rpx;
  169. border-radius: 10rpx;
  170. margin-right: 20rpx;
  171. }
  172. .detail-right {
  173. width: 70%;
  174. .title-price {
  175. display: flex;
  176. font-size: 28rpx;
  177. justify-content: space-between;
  178. align-items: center;
  179. .title {
  180. width: 330rpx;
  181. overflow: hidden;
  182. white-space: nowrap;
  183. text-overflow: ellipsis;
  184. }
  185. }
  186. .specifications {
  187. display: flex;
  188. justify-content: space-between;
  189. align-items: center;
  190. font-size: 28rpx;
  191. color: #777;
  192. margin-top: 10rpx;
  193. .title {
  194. width: 330rpx;
  195. overflow: hidden;
  196. white-space: nowrap;
  197. text-overflow: ellipsis;
  198. }
  199. }
  200. }
  201. }
  202. }
  203. .price-detail {
  204. display: flex;
  205. justify-content: flex-end;
  206. align-items: flex-end;
  207. margin-top: 20rpx;
  208. .price {
  209. font-weight: 600;
  210. }
  211. }
  212. .remarks {
  213. display: flex;
  214. font-size: 28rpx;
  215. background-color: #f4f4f4;
  216. border-radius: 10rpx;
  217. padding: 14rpx 20rpx;
  218. margin-top: 20rpx;
  219. }
  220. .btn-list {
  221. display: flex;
  222. justify-content: flex-end;
  223. margin-top: 30rpx;
  224. .btn-1 {
  225. font-size: 28rpx;
  226. color: #f83224;
  227. border: 2rpx solid #f83224;
  228. background-color: #fff;
  229. margin: 0;
  230. border-radius: 34rpx;
  231. min-width: 162rpx;
  232. margin-left: 20rpx;
  233. }
  234. .btn-2 {
  235. font-size: 28rpx;
  236. color: #222;
  237. border: 2rpx solid #979797;
  238. background-color: #fff;
  239. margin: 0;
  240. border-radius: 34rpx;
  241. min-width: 162rpx;
  242. margin-left: 20rpx;
  243. }
  244. .btn-3 {
  245. font-size: 28rpx;
  246. color: #fff;
  247. background-color: #f83224;
  248. margin: 0;
  249. border-radius: 34rpx;
  250. min-width: 162rpx;
  251. margin-left: 20rpx;
  252. }
  253. }
  254. }
  255. </style>