win-order.vue 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. <template>
  2. <view class="page-width order">
  3. <view class="page-width order-content">
  4. <view class="item dir-left-wrap " v-for="(item, index) in order_list" :key="index">
  5. <view class="image">
  6. <image class="pic" :src="item | getPicUrl"></image>
  7. <image class="convert-pic" v-if="item.is_convert == -1" src="../../image/convert.png"></image>
  8. </view>
  9. <view class="name-attr-price dir-top-nowrap main-left">
  10. <view class="name">{{item.name}}</view>
  11. <view class="attr">
  12. {{item.attr}}
  13. </view>
  14. <view class="number-price dir-left-nowrap main-between">
  15. <text class="number gray">{{item.num}}</text>
  16. <view v-if="item.refund === 1" @click="setSwitch(index)" class="refunding dir-left-nowrap cross-center">
  17. <text>
  18. 申请售后中
  19. </text>
  20. <image class="icon" :src="item.switch ? '/static/image/icon/icon-up.png' : '/static/image/icon/icon-down.png'"></image>
  21. </view>
  22. </view>
  23. <view class="main-right">
  24. <view v-if="item.refund === 0 && item.is_confirm == 1 " class="btn" @click="route_go(`/pages/order/refund/select-refund-type?sign=gift&id=${item.detail_id}`)">
  25. 申请售后
  26. </view>
  27. </view>
  28. </view>
  29. <view class="refund-content dir-top-nowrap" v-if="item.switch && item.orderRefund">
  30. <view class="item">
  31. <text class="gray">申请原因: </text>
  32. <text class="black">{{item.orderRefund.remark}}</text>
  33. </view>
  34. <view :class="{'item' : item.orderRefund.pic_list.length > 0}">
  35. <text class="gray">审核结果: </text>
  36. <text class="black">{{item.orderRefund.status == 1 ? '待商家处理' : item.orderRefund.status == 2 ? '同意' : item.orderRefund.status == 3 ? '拒绝' : ''}}</text>
  37. </view>
  38. <view class="dir-left-wrap " v-if="item.orderRefund.pic_list.length > 0">
  39. <image class="pic_url" @click="previewImage(item.orderRefund.pic_list, pic)" :src="pic" v-for="(pic,i) in item.orderRefund.pic_list" :key="i"></image>
  40. </view>
  41. </view>
  42. </view>
  43. </view>
  44. </view>
  45. </template>
  46. <script>
  47. export default {
  48. name: 'win-order',
  49. props: ['order_list', 'status_num'],
  50. methods: {
  51. route_go(data) {
  52. uni.navigateTo({
  53. url: data,
  54. })
  55. },
  56. setSwitch(index) {
  57. this.$emit('setSwitch', index)
  58. },
  59. previewImage(pic_list, image) {
  60. uni.previewImage({
  61. urls: pic_list,
  62. current: image,
  63. longPressActions: {
  64. itemList: ['发送给朋友', '保存图片'],
  65. success: function() {},
  66. fail: function() {}
  67. }
  68. });
  69. }
  70. },
  71. filters: {
  72. getPicUrl(data) {
  73. let goods_attr = Object.prototype.toString.call(data.goods_info) === '[object String]' ? JSON.parse(data.goods_info).goods_attr : data.goods_info.goods_attr;
  74. return goods_attr.pic_url ? goods_attr.pic_url : data.cover_pic;
  75. }
  76. }
  77. }
  78. </script>
  79. <style scoped lang="scss">
  80. @import "../../css/gift.scss";
  81. .btn {
  82. height: #{70upx};
  83. width: #{166upx};
  84. line-height: #{70upx};
  85. border-radius: #{38upx};
  86. font-size: #{26upx};
  87. color: #353535;
  88. border: #{1upx} solid #bbbbbb;
  89. text-align: center;
  90. margin-top: #{18upx};
  91. position: relative;
  92. right: 0;
  93. }
  94. .order {
  95. padding: #{0 24upx};
  96. margin-top: #{24upx};
  97. .order-content {
  98. background-color: #ffffff;
  99. padding: #{24upx 24upx 0 24upx};
  100. overflow: hidden;
  101. }
  102. }
  103. /*订单*/
  104. .item {
  105. margin-bottom: #{24upx};
  106. .image {
  107. width: #{160upx};
  108. height: #{160upx};
  109. position: relative;
  110. .pic {
  111. border-radius: #{8upx};
  112. width: #{160upx};
  113. height: #{160upx};
  114. }
  115. .convert-pic {
  116. width: #{160upx};
  117. height: #{160upx};
  118. position: absolute;
  119. top: 0;
  120. left: 0;
  121. }
  122. }
  123. .sign {
  124. position: absolute;
  125. top: 0;
  126. left: 0;
  127. border-top-left-radius: #{8upx};
  128. font-size: #{24upx};
  129. color: #ffffff;
  130. padding: #{10upx};
  131. }
  132. }
  133. /*名字价格规格*/
  134. .name-attr-price {
  135. width: calc(100% - #{160upx});
  136. padding-left: #{20upx};
  137. .name {
  138. font-size: #{24upx};
  139. line-height: #{30upx};
  140. height: #{60upx};
  141. margin-top: #{5upx};
  142. word-break: break-all;
  143. text-overflow: ellipsis;
  144. display: -webkit-box;
  145. -webkit-box-orient: vertical;
  146. -webkit-line-clamp: 2;
  147. overflow: hidden;
  148. white-space: normal !important;
  149. }
  150. .attr {
  151. font-size: #{24upx};
  152. color: #999999;
  153. margin-top: #{17upx};
  154. word-break: break-all;
  155. text-overflow: ellipsis;
  156. display: -webkit-box;
  157. -webkit-box-orient: vertical;
  158. -webkit-line-clamp: 1;
  159. overflow: hidden;
  160. white-space: normal !important;
  161. }
  162. .number-price {
  163. font-size: #{24upx};
  164. line-height: 1;
  165. margin-top: #{20upx};
  166. .number:before {
  167. content: "×";
  168. font-size: 80%;
  169. }
  170. .price:before {
  171. content: "¥";
  172. }
  173. }
  174. }
  175. /*合计*/
  176. .total {
  177. padding: #{24upx 0};
  178. /*灰字*/
  179. .gray-word {
  180. font-size: #{24upx};
  181. line-height: 1;
  182. }
  183. /*黑字*/
  184. .black-word {
  185. font-size: #{28upx};
  186. line-height: 1;
  187. }
  188. .black-word:before {
  189. content: '¥';
  190. font-size: 100%;
  191. }
  192. }
  193. .refund-content {
  194. width: #{654upx};
  195. padding: #{24upx};
  196. border: #{1upx} solid #bbbbbb;
  197. border-radius: #{15upx};
  198. margin-top: #{16upx};
  199. text {
  200. font-size: #{24upx};
  201. line-height: 1;
  202. }
  203. }
  204. .refunding {
  205. font-size: #{24upx};
  206. color: #353535;
  207. }
  208. .icon {
  209. width: #{18upx};
  210. height: #{11upx};
  211. margin-left: #{12upx};
  212. }
  213. .item {
  214. margin-bottom: #{16upx};
  215. }
  216. .pic_url {
  217. width: #{160upx};
  218. height: #{160upx};
  219. margin: #{0 16upx 16upx 0};
  220. }
  221. </style>