detailCard.vue 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261
  1. <template>
  2. <view class="card" @click="$emit('toInformation', itemInfo)">
  3. <view class="user-name">
  4. <view class="name">
  5. <image class="header-img" :src="itemInfo.member.avatar" mode=""></image>
  6. <text>{{ itemInfo.nickname }}</text>
  7. </view>
  8. <text class="order-status">{{ deliveryStatus }}</text>
  9. </view>
  10. <view
  11. class="order-detail"
  12. :style="model"
  13. v-for="item in itemInfo.order_goods"
  14. >
  15. <view class="detail">
  16. <image class="order-img" :src="item.goods_image" mode=""></image>
  17. <view class="detail-right">
  18. <view class="title-price">
  19. <view class="title"> {{ item.goods_name }}</view>
  20. <view class="price">
  21. <text style="font-size: 20rpx">¥</text>
  22. <text>{{ item.price.split(".")[0] }}</text
  23. >.
  24. <text style="font-size: 20rpx">{{
  25. item.price.split(".")[1]
  26. }}</text>
  27. </view>
  28. </view>
  29. <view class="specifications">
  30. <view class="title"> {{ item.sku_item.item }} </view>
  31. <text>x{{ item.goods_num }}</text>
  32. </view>
  33. </view>
  34. </view>
  35. <view class="price-detail">
  36. <view style="color: #222; font-size: 24rpx">
  37. <text>共{{ itemInfo.order_goods.length }}</text>
  38. <text>
  39. {{ "件商品" + "&nbsp;" }}
  40. </text>
  41. </view>
  42. <text style="font-size: 28rpx">买家实付</text>
  43. <view class="price">
  44. <text style="font-size: 20rpx">¥</text>
  45. <text>{{ itemInfo.amount.split(".")[0] }}</text
  46. >.
  47. <text style="font-size: 20rpx">{{
  48. itemInfo.amount.split(".")[1]
  49. }}</text>
  50. </view>
  51. </view>
  52. <view class="model" v-if="itemInfo.delivery_status == 'unreview'"> </view>
  53. </view>
  54. <view class="remarks" v-if="itemInfo.delivery_status == 'undelivered'">
  55. <view style="margin-right: 30rpx; color: #222"> 商家备注 </view>
  56. <view style="color: rgba(34, 34, 34, 0.6)"> {{ itemInfo.remark }} </view>
  57. </view>
  58. <view
  59. class="btn-list"
  60. v-if="
  61. itemInfo.delivery_status !== 'unreview' &&
  62. itemInfo.status != 'merdelivered'
  63. "
  64. >
  65. <button class="btn-1" v-if="itemInfo.delivery_status == 'unfill'">
  66. 缴纳保证金
  67. </button>
  68. <button class="btn-2" v-if="itemInfo.delivery_status == 'undelivered'">
  69. 备注
  70. </button>
  71. <button
  72. class="btn-1"
  73. v-if="itemInfo.delivery_status == 'undelivered'"
  74. @click.stop="toGoods"
  75. >
  76. 发货
  77. </button>
  78. <button class="btn-2" v-if="itemInfo.delivery_status == ' delivered'">
  79. 查看物流
  80. </button>
  81. </view>
  82. </view>
  83. </template>
  84. <script>
  85. export default {
  86. props: {
  87. itemInfo: {
  88. typeof: Object,
  89. default: {},
  90. },
  91. },
  92. computed: {
  93. model() {
  94. if (this.itemInfo.delivery_status == "unreview") {
  95. return "filter: blur(5px);";
  96. }
  97. },
  98. //根据状态 返回不同的字段
  99. deliveryStatus() {
  100. if (this.itemInfo.delivery_status == "unreview") {
  101. return "待审核";
  102. } else if (this.itemInfo.delivery_status == "unfill") {
  103. return "待缴纳保证金";
  104. } else if (this.itemInfo.delivery_status == "undelivered") {
  105. return "待团长发货";
  106. } else if (this.itemInfo.delivery_status == "merdelivered") {
  107. return "待总部发货";
  108. } else if (this.itemInfo.delivery_status == "delivered") {
  109. return "已发货";
  110. } else if (this.itemInfo.delivery_status == "domestic_delivered") {
  111. return "团长已发货";
  112. }
  113. },
  114. },
  115. data() {
  116. return {};
  117. },
  118. methods: {
  119. toGoods() {
  120. uni.navigateTo({
  121. url: `/pageD/deliverGoods/deliverGoods?id=${this.itemInfo.id}`,
  122. });
  123. },
  124. },
  125. };
  126. </script>
  127. <style scoped lang="scss">
  128. .card {
  129. background-color: #fff;
  130. border-radius: 16rpx;
  131. padding: 0 20rpx;
  132. padding-bottom: 20rpx;
  133. margin-bottom: 20rpx;
  134. .user-name {
  135. display: flex;
  136. justify-content: space-between;
  137. align-items: center;
  138. height: 84rpx;
  139. border-bottom: 2rpx solid rgba(151, 151, 151, 0.2);
  140. .name {
  141. display: flex;
  142. align-items: center;
  143. font-size: 24rpx;
  144. color: #333;
  145. .header-img {
  146. width: 40rpx;
  147. height: 40rpx;
  148. border-radius: 50%;
  149. margin-right: 12rpx;
  150. }
  151. }
  152. .order-status {
  153. font-size: 24rpx;
  154. color: #f83224;
  155. }
  156. }
  157. .order-detail {
  158. margin-top: 22rpx;
  159. position: relative;
  160. .detail {
  161. display: flex;
  162. .order-img {
  163. width: 180rpx;
  164. height: 180rpx;
  165. border-radius: 10rpx;
  166. margin-right: 20rpx;
  167. }
  168. .detail-right {
  169. width: 70%;
  170. .title-price {
  171. display: flex;
  172. font-size: 28rpx;
  173. justify-content: space-between;
  174. align-items: center;
  175. .title {
  176. width: 330rpx;
  177. overflow: hidden;
  178. white-space: nowrap;
  179. text-overflow: ellipsis;
  180. }
  181. }
  182. .specifications {
  183. display: flex;
  184. justify-content: space-between;
  185. align-items: center;
  186. font-size: 28rpx;
  187. color: #777;
  188. margin-top: 10rpx;
  189. .title {
  190. width: 330rpx;
  191. overflow: hidden;
  192. white-space: nowrap;
  193. text-overflow: ellipsis;
  194. }
  195. }
  196. }
  197. }
  198. }
  199. .price-detail {
  200. display: flex;
  201. justify-content: flex-end;
  202. align-items: flex-end;
  203. margin-top: 20rpx;
  204. .price {
  205. font-weight: 600;
  206. }
  207. }
  208. .remarks {
  209. display: flex;
  210. font-size: 28rpx;
  211. background-color: #f4f4f4;
  212. border-radius: 10rpx;
  213. padding: 14rpx 20rpx;
  214. margin-top: 20rpx;
  215. }
  216. .btn-list {
  217. display: flex;
  218. justify-content: flex-end;
  219. margin-top: 30rpx;
  220. .btn-1 {
  221. font-size: 28rpx;
  222. color: #f83224;
  223. border: 2rpx solid #f83224;
  224. background-color: #fff;
  225. margin: 0;
  226. border-radius: 34rpx;
  227. min-width: 162rpx;
  228. margin-left: 20rpx;
  229. }
  230. .btn-2 {
  231. font-size: 28rpx;
  232. color: #222;
  233. border: 2rpx solid #979797;
  234. background-color: #fff;
  235. margin: 0;
  236. border-radius: 34rpx;
  237. min-width: 162rpx;
  238. }
  239. }
  240. }
  241. </style>