detailCard.vue 6.9 KB

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