integralOrderDelivery.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. <template>
  2. <view>
  3. <view class="top-cont">
  4. <!-- 背景图片 -->
  5. <view class="bg"></view>
  6. <view class="top-inner">
  7. <!-- 运单号 -->
  8. <view class="waybill-number">
  9. <view class="inner">
  10. <view class="num-box">
  11. <text class="text">运单号</text>
  12. <text class="text">{{deliverySn}}</text>
  13. <view class="copy" @click="copyOrderSn(deliverySn)">复制</view>
  14. </view>
  15. <view class="kf-box">
  16. <text class="text">{{express}}</text>
  17. <!-- <text class="text">客服电话:95311</text> -->
  18. </view>
  19. </view>
  20. </view>
  21. <view class="content">
  22. <!-- 物流信息 -->
  23. <view class="refund-steps" v-if="expressList&&expressList.length>0">
  24. <view v-for="(item,index) in expressList" :key="index" class="steps">
  25. <view class="title">
  26. <!-- <text v-if="index == 0" class="text black-text">已签收</text> -->
  27. <!-- <text class="text gray-bold">运输中</text> -->
  28. <!-- 左侧灰色圆点 -->
  29. <view class="dot"></view>
  30. <!-- 对号 -->
  31. <image class="img" src="/static/images/complete.png" mode=""></image>
  32. <!-- 运输中图标 -->
  33. <image class="img" src="/static/images/car40.png" mode=""></image>
  34. </view>
  35. <view class="desc-text">
  36. {{item.AcceptStation}}
  37. </view>
  38. <view class="time">{{item.AcceptTime}}</view>
  39. </view>
  40. </view>
  41. <view class="refund-steps" v-else>{{Reason}}</view>
  42. </view>
  43. </view>
  44. </view>
  45. </view>
  46. </template>
  47. <script>
  48. import {getExpress} from './api/integral.js'
  49. export default {
  50. data() {
  51. return {
  52. orderId:null,
  53. deliverySn:null,
  54. express:{},
  55. expressList:[],
  56. Reason: ''
  57. };
  58. },
  59. onLoad(option) {
  60. this.orderId=option.orderId;
  61. this.getExpress();
  62. },
  63. methods: {
  64. getExpress(){
  65. getExpress({orderId:this.orderId}).then(res => {
  66. if(res.code==200){
  67. this.express=res.deliveryName;
  68. this.expressList=res.data.Traces;
  69. this.deliverySn=res.data.LogisticCode
  70. this.Reason = res.data.Reason
  71. }else{
  72. uni.showToast({
  73. icon:'none',
  74. title: "请求失败",
  75. });
  76. }
  77. });
  78. },
  79. // 返回上一页
  80. back() {
  81. uni.navigateBack()
  82. },
  83. // 复制运单号
  84. copyOrderSn(text) {
  85. // 复制方法
  86. uni.setClipboardData({
  87. data:text,
  88. success:()=>{
  89. uni.showToast({
  90. title:'内容已成功复制到剪切板',
  91. icon:'none'
  92. })
  93. }
  94. });
  95. },
  96. // 拨打电话
  97. callPhone(phone) {
  98. uni.makePhoneCall({
  99. phoneNumber: phone
  100. })
  101. }
  102. }
  103. }
  104. </script>
  105. <style lang="scss">
  106. .top-cont{
  107. width: 100%;
  108. height: 336upx;
  109. position: relative;
  110. .bg{
  111. width: 100%;
  112. height: 350upx;
  113. position: absolute;
  114. top: 0;
  115. left: 0;
  116. z-index: 1;
  117. background-color: #2583EB;
  118. border-radius: 0rpx 0rpx 100rpx 100rpx;
  119. }
  120. .top-inner{
  121. width: 100%;
  122. height: 100%;
  123. position: absolute;
  124. top: 0;
  125. left: 0;
  126. z-index: 2;
  127. .back-box{
  128. height: 88upx;
  129. padding-left: 22upx;
  130. display: flex;
  131. align-items: center;
  132. justify-content: space-between;
  133. padding: 0 20upx;
  134. image{
  135. width: 40upx;
  136. height: 40upx;
  137. }
  138. .title{
  139. font-size: 36upx;
  140. font-family: PingFang SC;
  141. font-weight: 500;
  142. color: #FFFFFF;
  143. }
  144. }
  145. .waybill-number{
  146. padding: 0 20upx;
  147. margin-top: 66upx;
  148. .inner{
  149. box-sizing: border-box;
  150. height: 150upx;
  151. background: #FFFFFF;
  152. border-radius: 16upx;
  153. padding: 40upx 30upx;
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: space-between;
  157. .num-box{
  158. display: flex;
  159. align-items: center;
  160. .text{
  161. font-size: 28upx;
  162. font-family: PingFang SC;
  163. font-weight: 500;
  164. color: #111111;
  165. line-height: 1;
  166. margin-right: 30upx;
  167. &:last-child{
  168. margin-right: 20upx;
  169. }
  170. }
  171. .copy{
  172. width: 58upx;
  173. height: 32upx;
  174. line-height: 32upx;
  175. text-align: center;
  176. font-size: 22upx;
  177. font-family: PingFang SC;
  178. font-weight: 500;
  179. color: #222222;
  180. background: #F5F5F5;
  181. border-radius: 4upx;
  182. }
  183. }
  184. .kf-box{
  185. display: flex;
  186. align-items: center;
  187. .text{
  188. font-size: 26upx;
  189. font-family: PingFang SC;
  190. font-weight: 500;
  191. color: #999999;
  192. line-height: 1;
  193. margin-right: 20upx;
  194. }
  195. }
  196. }
  197. }
  198. }
  199. }
  200. .content{
  201. margin: 20rpx 0rpx;
  202. padding: 0 20upx;
  203. .refund-steps{
  204. background: #FFFFFF;
  205. border-radius: 16upx;
  206. padding: 40upx 44upx;
  207. .steps{
  208. padding-left: 40upx;
  209. padding-bottom: 56upx;
  210. position: relative;
  211. &::after{
  212. content: "";
  213. width: 4upx;
  214. height: 100%;
  215. background: #F1F1F1;
  216. position: absolute;
  217. left: 0;
  218. top: 20upx;
  219. }
  220. &:last-child{
  221. padding-bottom: 0;
  222. &::after{
  223. display: none;
  224. }
  225. }
  226. .title{
  227. position: relative;
  228. .text{
  229. font-size: 30upx;
  230. font-family: PingFang SC;
  231. font-weight: 500;
  232. color: #666666;
  233. line-height: 38upx;
  234. &.black-text{
  235. color: #111111;
  236. font-weight: bold;
  237. }
  238. &.gray-bold{
  239. font-weight: bold;
  240. color: #666666;
  241. }
  242. }
  243. .dot{
  244. width: 16upx;
  245. height: 16upx;
  246. background: #EBEBEB;
  247. border-radius: 50%;
  248. position: absolute;
  249. left: -46upx;
  250. top: 11upx;
  251. z-index: 10;
  252. &.active{
  253. background-color: #2583EB;
  254. }
  255. }
  256. .img{
  257. width: 40upx;
  258. height: 40upx;
  259. position: absolute;
  260. left: -57upx;
  261. top: 2upx;
  262. z-index: 10;
  263. }
  264. }
  265. .desc-text{
  266. font-size: 28upx;
  267. font-family: PingFang SC;
  268. font-weight: 500;
  269. color: #666666;
  270. line-height: 1.6;
  271. margin-top: 10upx;
  272. .phone{
  273. font-size: 28upx;
  274. font-family: PingFang SC;
  275. font-weight: 500;
  276. color: #2583EB;
  277. line-height: 1.6;
  278. }
  279. }
  280. .time{
  281. font-size: 24upx;
  282. font-family: Gilroy;
  283. font-weight: 500;
  284. color: #999999;
  285. margin-top: 10upx;
  286. }
  287. }
  288. }
  289. }
  290. </style>