express.vue 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="page">
  3. <!-- 物流信息卡片 -->
  4. <ExpressGoodsCard :data="expressInfo"></ExpressGoodsCard>
  5. <!-- 物流节点 -->
  6. <view class="express-points">
  7. <u-steps style="width: 100%;" active-color="#22ac38" :list="expressDotList" mode="dot" :current="expressInfo.deliverystatus"></u-steps>
  8. </view>
  9. <!-- 物流详细节点 -->
  10. <view class="express-detail"><ExpressList :logisticsData="expressInfo.list"></ExpressList></view>
  11. </view>
  12. </template>
  13. <script>
  14. import ExpressGoodsCard from '@/pages-mall/components/order/express-goods-card.vue';
  15. import ExpressList from '@/pages-mall/components/express/list.vue';
  16. import { setAttribute, changeAttribute } from '@/pages-mall/components/express/utils.js';
  17. const app = getApp();
  18. export default {
  19. components: {
  20. ExpressGoodsCard,
  21. ExpressList
  22. },
  23. data() {
  24. return {
  25. activeColor:this.$appTheme.appThemeColor,
  26. // 订单详情
  27. orderInfo: {},
  28. // 物流信息
  29. expressInfo:{},
  30. // 物流节点
  31. expressDotList: [{ name: '已发货' }, { name: '运输中' }, { name: '派件中' }, { name: '已签收' }],
  32. testStrList: ['在途', '揽收', '疑难', '签收', '退签', '派件', '退回', '转单', '待清关', '清关中', '已清关', '清关异常', '收件人拒签'],
  33. logisticsData: [
  34. /* {
  35. context:
  36. '客户签收人: 已签收 感谢使用圆通速递,期待再次为您服务 如有疑问请联系:xxxxxxxxx,投诉电话:020-xxxxxxxx。疫情期间圆通每天对网点多次消毒,快递小哥每天测量体温,佩戴口罩',
  37. time: '2021-02-28 10:04:59',
  38. ftime: '2021-02-28 10:04:59',
  39. status: '签收',
  40. areaCode: null,
  41. areaName: null,
  42. monthDay: '02-28',
  43. hourMinute: '10:04'
  44. },
  45. {
  46. context: '【广东省广州市海珠区工业大道公司】 派件中 派件人: 吴晓贤 电话 xxxxxxxxx 。 圆通快递小哥每天已测体温,请放心收寄快递 如有疑问,请联系:020-xxxxxxxx',
  47. time: '2021-02-28 08:25:15',
  48. ftime: '2021-02-28 08:25:15',
  49. status: '派件',
  50. areaCode: 'CNxxxxxxxxxxx',
  51. areaName: '广东,广州市,海珠区',
  52. monthDay: '02-28',
  53. hourMinute: '08:25'
  54. },
  55. {
  56. context: '【广东省广州市海珠区工业大道】 已发出',
  57. time: '2021-02-28 06:56:54',
  58. ftime: '2021-02-28 06:56:54',
  59. status: '在途',
  60. areaCode: null,
  61. areaName: null,
  62. monthDay: '02-28',
  63. hourMinute: '06:56'
  64. },
  65. {
  66. context: '【广东省广州市海珠区工业大道公司】 已收入',
  67. time: '2021-02-28 06:06:54',
  68. ftime: '2021-02-28 06:06:54',
  69. status: '在途',
  70. areaCode: 'CNxxxxxxxxxxx',
  71. areaName: '广东,广州市,海珠区',
  72. monthDay: '02-28',
  73. hourMinute: '06:06'
  74. },
  75. {
  76. context: '【广州转运中心】 已发出 下一站 【广东省广州市海珠区工业大道公司】',
  77. time: '2021-02-28 00:58:47',
  78. ftime: '2021-02-28 00:58:47',
  79. status: '在途',
  80. areaCode: 'CNxxxxxxxxxxxxx',
  81. areaName: '广东,广州市',
  82. monthDay: '02-28',
  83. hourMinute: '00:58'
  84. },
  85. {
  86. context: '【广州转运中心公司】 已收入',
  87. time: '2021-02-28 00:19:02',
  88. ftime: '2021-02-28 00:19:02',
  89. status: '在途',
  90. areaCode: 'CNxxxxxxxxxxxxx',
  91. areaName: '广东,广州市',
  92. monthDay: '02-28',
  93. hourMinute: '00:19'
  94. },
  95. {
  96. context: '【佛山转运中心】 已发出 下一站 【广州转运中心公司】',
  97. time: '2021-02-27 21:09:35',
  98. ftime: '2021-02-27 21:09:35',
  99. status: '在途',
  100. areaCode: 'CN440600000000',
  101. areaName: '广东,佛山市',
  102. monthDay: '02-27',
  103. hourMinute: '21:09'
  104. },
  105. {
  106. context: '【佛山转运中心公司】 已收入',
  107. time: '2021-02-27 21:06:51',
  108. ftime: '2021-02-27 21:06:51',
  109. status: '在途',
  110. areaCode: 'CN440600000000',
  111. areaName: '广东,佛山市',
  112. monthDay: '02-27',
  113. hourMinute: '21:06'
  114. },
  115. {
  116. context: '【广东省佛山市禅城】 已发出 下一站 【佛山转运中心公司】',
  117. time: '2021-02-27 19:42:05',
  118. ftime: '2021-02-27 19:42:05',
  119. status: '在途',
  120. areaCode: 'CN440604000000',
  121. areaName: '广东,佛山市,禅城区',
  122. monthDay: '02-27',
  123. hourMinute: '19:42'
  124. },
  125. {
  126. context: '【广东省佛山市南海市场部一部公司】 已收件 取件人: 陈xx (xxxxxxxxxxx)',
  127. time: '2021-02-27 19:38:46',
  128. ftime: '2021-02-27 19:38:46',
  129. status: '揽收',
  130. areaCode: null,
  131. areaName: null,
  132. monthDay: '02-27',
  133. hourMinute: '19:38'
  134. },
  135. {
  136. context: '【广东省佛山市禅城公司】 已收件 取件人: 吴xx (xxxxxxxxxxx)',
  137. time: '2021-02-27 14:36:42',
  138. ftime: '2021-02-27 14:36:42',
  139. status: '揽收',
  140. areaCode: null,
  141. areaName: null,
  142. monthDay: '02-27',
  143. hourMinute: '14:36'
  144. }
  145. */
  146. ]
  147. };
  148. },
  149. onLoad(opt) {
  150. if(!opt.orderInfo){
  151. uni.navigateBack();
  152. return;
  153. }
  154. // this.orderInfo = uni.getStorageSync('orderInfo');
  155. this.orderInfo = JSON.parse(decodeURIComponent(opt.orderInfo));
  156. console.log('>>>>>123456>',this.orderInfo)
  157. // this.logisticsData = changeAttribute(this.testStrList, setAttribute(this.logisticsData));
  158. this.getExpressDetail();
  159. },
  160. methods:{
  161. getExpressDetail(){
  162. this.$u.api.getExpressDetailAjax(this.orderInfo.id).then(({code,data})=>{
  163. console.log(data);
  164. if(code==1){
  165. this.expressInfo = data;
  166. }
  167. }).catch(()=>{
  168. })
  169. },
  170. },
  171. };
  172. </script>
  173. <style lang="scss" scoped>
  174. .express-points {
  175. display: flex;
  176. justify-content: center;
  177. align-items: center;
  178. padding: 60rpx 30rpx;
  179. background-color: $app-theme-bg-color;
  180. margin-bottom: 24rpx;
  181. }
  182. .express-detail {
  183. background-color: $app-theme-bg-color;
  184. }
  185. </style>