orderDelivery.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301
  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 {orderDetail,getExpress} from '@/api/courseAnswer.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(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: #FF5C03;
  118. background: linear-gradient(#FF5C03, #E2C99E);
  119. border-radius: 0rpx 0rpx 100rpx 100rpx;
  120. }
  121. .top-inner{
  122. width: 100%;
  123. height: 100%;
  124. position: absolute;
  125. top: 0;
  126. left: 0;
  127. z-index: 2;
  128. .back-box{
  129. height: 88upx;
  130. padding-left: 22upx;
  131. display: flex;
  132. align-items: center;
  133. justify-content: space-between;
  134. padding: 0 20upx;
  135. image{
  136. width: 40upx;
  137. height: 40upx;
  138. }
  139. .title{
  140. font-size: 36upx;
  141. font-family: PingFang SC;
  142. font-weight: 500;
  143. color: #FFFFFF;
  144. }
  145. }
  146. .waybill-number{
  147. padding: 0 20upx;
  148. margin-top: 66upx;
  149. .inner{
  150. box-sizing: border-box;
  151. height: 150upx;
  152. background: #FFFFFF;
  153. border-radius: 16upx;
  154. padding: 40upx 30upx;
  155. display: flex;
  156. flex-direction: column;
  157. justify-content: space-between;
  158. .num-box{
  159. display: flex;
  160. align-items: center;
  161. .text{
  162. font-size: 28upx;
  163. font-family: PingFang SC;
  164. font-weight: 500;
  165. color: #111111;
  166. line-height: 1;
  167. margin-right: 30upx;
  168. &:last-child{
  169. margin-right: 20upx;
  170. }
  171. }
  172. .copy{
  173. width: 58upx;
  174. height: 32upx;
  175. line-height: 32upx;
  176. text-align: center;
  177. font-size: 22upx;
  178. font-family: PingFang SC;
  179. font-weight: 500;
  180. color: #222222;
  181. background: #F5F5F5;
  182. border-radius: 4upx;
  183. }
  184. }
  185. .kf-box{
  186. display: flex;
  187. align-items: center;
  188. .text{
  189. font-size: 26upx;
  190. font-family: PingFang SC;
  191. font-weight: 500;
  192. color: #999999;
  193. line-height: 1;
  194. margin-right: 20upx;
  195. }
  196. }
  197. }
  198. }
  199. }
  200. }
  201. .content{
  202. margin: 20rpx 0rpx;
  203. padding: 0 20upx;
  204. .refund-steps{
  205. background: #FFFFFF;
  206. border-radius: 16upx;
  207. padding: 40upx 44upx;
  208. .steps{
  209. padding-left: 40upx;
  210. padding-bottom: 56upx;
  211. position: relative;
  212. &::after{
  213. content: "";
  214. width: 4upx;
  215. height: 100%;
  216. background: #F1F1F1;
  217. position: absolute;
  218. left: 0;
  219. top: 20upx;
  220. }
  221. &:last-child{
  222. padding-bottom: 0;
  223. &::after{
  224. display: none;
  225. }
  226. }
  227. .title{
  228. position: relative;
  229. .text{
  230. font-size: 30upx;
  231. font-family: PingFang SC;
  232. font-weight: 500;
  233. color: #666666;
  234. line-height: 38upx;
  235. &.black-text{
  236. color: #111111;
  237. font-weight: bold;
  238. }
  239. &.gray-bold{
  240. font-weight: bold;
  241. color: #666666;
  242. }
  243. }
  244. .dot{
  245. width: 16upx;
  246. height: 16upx;
  247. background: #EBEBEB;
  248. border-radius: 50%;
  249. position: absolute;
  250. left: -46upx;
  251. top: 11upx;
  252. z-index: 10;
  253. &.active{
  254. background-color: #FF5C03;
  255. }
  256. }
  257. .img{
  258. width: 40upx;
  259. height: 40upx;
  260. position: absolute;
  261. left: -57upx;
  262. top: 2upx;
  263. z-index: 10;
  264. }
  265. }
  266. .desc-text{
  267. font-size: 28upx;
  268. font-family: PingFang SC;
  269. font-weight: 500;
  270. color: #666666;
  271. line-height: 1.6;
  272. margin-top: 10upx;
  273. .phone{
  274. font-size: 28upx;
  275. font-family: PingFang SC;
  276. font-weight: 500;
  277. color: #FF5C03;
  278. line-height: 1.6;
  279. }
  280. }
  281. .time{
  282. font-size: 24upx;
  283. font-family: Gilroy;
  284. font-weight: 500;
  285. color: #999999;
  286. margin-top: 10upx;
  287. }
  288. }
  289. }
  290. }
  291. </style>