afterSalesSelect.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. <template>
  2. <view>
  3. <view class="after-sales-goods-detail-view">
  4. <view class="header">
  5. <view>
  6. 本次售后服务将由
  7. <text class="seller-name">{{ sku.storeName }}</text>
  8. 为您提供
  9. </view>
  10. </view>
  11. <view>
  12. <view class="goods-item-view" :key="index" v-for="(item,index) in sku.orderItems" v-if="item.sn == sn" @click="navigateToGoodsDetail(sku.skuId)">
  13. <view class="goods-img">
  14. <u-image border-radius="6" width="131rpx" height="131rpx" :src="item.image"></u-image>
  15. </view>
  16. <view class="goods-info">
  17. <view class="goods-title u-line-2">{{ item.name }}</view>
  18. <view class="goods-price">
  19. <span v-if="sku.orderItems.length <= 1">¥{{ sku.flowPrice }}</span>
  20. <span class="num" v-else>购买数量{{item.num}}</span>
  21. <span v-if="sku.orderItems.length <= 1" class="num">购买数量: {{ item.num }}</span>
  22. </view>
  23. </view>
  24. </view>
  25. </view>
  26. </view>
  27. <view class="select-view">
  28. <view class="select-cell" @click="onSelect(1)">
  29. <view class="select-image">
  30. <image style="height: 51rpx; width: 51rpx" src="/static/order/t1.png"></image>
  31. </view>
  32. <view class="right">
  33. <view class="select-title">退货</view>
  34. <view class="select-sub-title">
  35. 退回收到的商品
  36. <uni-icons color="#BABABA" type="arrowright"></uni-icons>
  37. </view>
  38. </view>
  39. </view>
  40. <view class="select-cell" @click="onSelect(3)">
  41. <view class="select-image">
  42. <image style="height: 51rpx; width: 51rpx" src="/static/order/t3.png"></image>
  43. </view>
  44. <view class="right">
  45. <view class="select-title">退款</view>
  46. <view class="select-sub-title">
  47. 退款商品返还金额
  48. <uni-icons color="#BABABA" type="arrowright"></uni-icons>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </template>
  55. <script>
  56. import UniIcons from "@/components/uni-icons/uni-icons.vue";
  57. export default {
  58. components: {
  59. UniIcons,
  60. },
  61. data() {
  62. return {
  63. sn: "",
  64. sku: {}, //sku
  65. };
  66. },
  67. onLoad(options) {
  68. this.sn = options.sn;
  69. let dData = decodeURIComponent(options.sku);
  70. let newData = JSON.parse(dData);
  71. this.sku = newData;
  72. },
  73. methods: {
  74. /**
  75. * 选择退货流程
  76. */
  77. onSelect(value) {
  78. uni.redirectTo({
  79. url: `./afterSalesDetail?sn=${this.sn}&sku=${encodeURIComponent(
  80. JSON.stringify(this.sku)
  81. )}&value=${value}`,
  82. });
  83. },
  84. /**
  85. * 跳转到商品信息
  86. */
  87. navigateToGoodsDetail(id) {
  88. uni.navigateTo({
  89. url: `/pages/product/goods?id=${id}&goodsId=${goodsId}`,
  90. });
  91. },
  92. },
  93. };
  94. </script>
  95. <style lang="scss">
  96. page,
  97. .content {
  98. background: $page-color-base;
  99. height: 100%;
  100. }
  101. .after-sales-goods-detail-view {
  102. background-color: #fff;
  103. .header {
  104. background-color: #f7f7f7;
  105. color: #999999;
  106. font-size: 22rpx;
  107. display: flex;
  108. flex-direction: row;
  109. align-items: center;
  110. justify-content: center;
  111. line-height: 70rpx;
  112. .header-text {
  113. background-color: #999999;
  114. padding: 10rpx 30rpx;
  115. border-radius: 50rpx;
  116. }
  117. .seller-name {
  118. color: $main-color;
  119. }
  120. }
  121. .goods-item-view {
  122. display: flex;
  123. flex-direction: row;
  124. padding: 10rpx 30rpx;
  125. background-color: #eef1f2;
  126. .goods-img {
  127. }
  128. .goods-info {
  129. padding-left: 30rpx;
  130. flex: 1;
  131. .goods-title {
  132. margin-bottom: 10rpx;
  133. color: $font-color-dark;
  134. }
  135. .goods-specs {
  136. font-size: 24rpx;
  137. margin-bottom: 10rpx;
  138. color: #cccccc;
  139. }
  140. .goods-price {
  141. display: flex;
  142. flex-direction: row;
  143. justify-content: space-between;
  144. font-size: 28rpx;
  145. margin-bottom: 10rpx;
  146. color: $light-color;
  147. .num {
  148. font-size: 24rpx;
  149. color: #999999;
  150. }
  151. }
  152. }
  153. .goods-num {
  154. width: 60rpx;
  155. color: $main-color;
  156. }
  157. }
  158. }
  159. .select-view {
  160. background-color: #fff;
  161. margin-top: 20rpx;
  162. .select-cell {
  163. display: flex;
  164. align-items: center;
  165. margin: 0rpx 20rpx;
  166. line-height: 110rpx;
  167. border-bottom: 1px solid $page-color-base;
  168. .select-image {
  169. width: 51rpx;
  170. height: 110rpx;
  171. line-height: 110rpx;
  172. display: flex;
  173. align-items: center;
  174. }
  175. .right {
  176. flex: 1;
  177. display: flex;
  178. align-items: center;
  179. justify-content: space-between;
  180. .select-title {
  181. margin-left: 18rpx;
  182. color: #666666;
  183. width: 200rpx;
  184. }
  185. .select-sub-title {
  186. color: #cccccc;
  187. }
  188. }
  189. }
  190. }
  191. </style>